Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO ODBC recordset of Excel file returning NULL when value is "2 2"

Status
Not open for further replies.

colly9

Programmer
Sep 10, 2002
7
GB
Using Excel 97, MDAC 2.6

Problem:
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.

Iain.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top