Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ado problem in excel
Here are a couple of suggestions. If you use the Range.CopyFromRecordset method to retrieve your data then any Null values will be handled automatically. If you need to retrieve string values directly, the typical way to handle that is something like the following: Dim lValue As Long If IsNull(rsData.Fields(0).Value) Then lValue = 0 Else lValue = rsData.Fields(0).Value End If You could also rewrite your SQL statement to replace nulls with zero so that you don't have the problem to begin with. -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * "Goh Siang Hwee" wrote in message ... I am facing some problem in ado recordset when i tried to retrieve data which is numeric and it return null finally. I change the field datatype to text afterward and reenter, it seems no problem. but now the there are a lot of data inserted using the old excel file. It is possible for me to get the numeric data for excel thru visual basic 6. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ado problem in excel
Hi, thanks Rob. I have solved my problem by using other way. I set the
connection string "Extended Properties" to IMEX=1 and all the problem solved. Thanks anyway. Really appreciate for your help. Regards, Goh Siang Hwee *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Colon at the end of excel file name(ex: problem.xls:1, problem.xls | New Users to Excel | |||
Problem viewing Excel 2003 Pivot Chart fields in Excel 2007 | Charts and Charting in Excel | |||
Weird problem with Excel 2000...Worksheets disappearing in a shared Excel file | Excel Discussion (Misc queries) | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
Excel 97 chart opened in Excel 2003 - Source Data problem | Charts and Charting in Excel |