View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
nate axtell nate axtell is offline
external usenet poster
 
Posts: 12
Default adodb.recordset with excel

Thanks again for the link, Dick.
I was checking out the registry for ImortMixedTypes and I found mine set to
"Text".
The link you posted says "IMEX=0 and IMEX=2 result in ImportMixedTypes being
ignored and the default value of 'Majority Types' is used. IMEX=1 is the
only way to ensure ImportMixedTypes=Text is honored"...

Do you know if this means that the ImortMixedTypes key is supposed to be
"Majority Types" by default or that that is just a default that is used by
the driver? I am worried that ImportMixedTypes wont be "Text" for every
clients' installation by the wording of the qoute above. If it is always
Text then I should be fine.

Thanks, Nate



"Dick Kusleika" wrote in message
...
Nate

Here's everything you ever wanted to know about mixed data types

http://www.dicks-blog.com/excel/2004...al_data_m.html

Thanks to OneDayWhen for this awesome contribution.

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"nate axtell" <naxtell at progeny dot net wrote in message
...
I'm using an adodb.recordset to query and obtain the contents of an

Excel
file in ASP with VBScript.
I'm having a problem when there are numeric entries mixed with alpha &
numeric entries within the same column.
The query I use seems to pick one of the two types and return NULL for

any
of the other type.
Is there a way to specify that the columns will all be of a specific

type?
I've tried to set the format in the Excel file to all General or all

Text
but that doesn't seem to help. Any ideas would help, thanks.
Here's some code of what i'm doing basically:
...
Set XLconn = CreateObject("ADODB.Connection") 'Excel connection object
XLconn.ConnectionString = connectstr
XLconn.Open
Set XLrs = CreateObject("ADODB.Recordset") 'create the record set object
XLrs.cursortype = 3
XLrs.open "Select * From [sheet1$]", XLconn
...
Thanks,
Nate