Problem reading Excel 2003 file through OleDB

L

Luismi

Hy everybody,

I've got a problem reading an Excel 2003 file in VB.NET. The problem
comes when I do a SQL sentence through the Jet engine. If one column in the
Excel file contains some numeric values and some string values, only returns
the types of the first row that finds, the other data type is returned as
NULL value.

How can I return al the data types from the column?

Here is my SQL sentence:
SELECT * FROM [PAGE1$]

Thank's.
 
N

Nick Hodge

Luismi

Can you not use the native SQL engine rather than the Jet engine as that, as
you have found this determines the data type by the first record.

What about using a CAST or CONVERT statement in the SQL query??

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top