
adodb connection to excel: recordset.fields(i).value=null for fields with numeric value
I would guess that the default 'empty' variable for text fields is an empty
string whereas the equivalent for other data types (including general) is
NULL. If you don't know what data type a cell is you can either read it's
format before the content (and handle in different ways) or extract all cell
content as strings (variable = rs.fields("column_title").value & "") and
convert them accordingly within your code.
I hope this helps to some extent.
Mike
Quote:
>Dear Guru's,
>When I make an ADODBconnection to Excel files with Jet 3.51 and execute a
>SQLquery statement to an ADODBrecordset I have the following issue:
>If there are numeric values in general cellformat the
>recordset.fields(i).value=null. If I make the cellformat=text then the
>returned value's aren't NULL.
>What is the problem? Should I change some recordset properties?
>If yes: what, how?