ADO ODBC connected recordset of Excel file is returning NULL when value is "2 2"
Posted on 2003-03-13
Using Excel 97, MDAC 2.6
opening an ODBC connection to an Excel spreadsheet (OLEDB connection files with "cannot find installable ISAM").
Open recordset object and read in data.
In one column, the first 4 rows of data are integer values, the fifth is alpahanumeric ("2 2" to be exact).
When the recordset reads in the 5th row, it set the value of the column to NULL, and sets its vartype to 1 (vbNull or no valid data).
The earlier columns work, and the data type is set to 5 (vbDouble).
How can I get it to read in the column as alphanumeric ? I have set the connection string to have fg=0 (field guess - I think this is deprecated because it doesnt work), but still no joy. The ODBC config is to sample 8 rows (but I would rather it didnt sample anything and just read in the raw data).
All help greatly appreciated.