MaxScanRows=0 gives wront datatypes for Text file
From: Payman (paymankamali_at_yahoo.com)
Date: 04/29/04
- Next message: Developer: "Re: Difference between adDate and adDBDate?"
- Previous message: Jerry Pisk: "Re: How to make a numbering field to a field selection in SQL?"
- Messages sorted by: [ date ] [ thread ]
Date: 29 Apr 2004 02:27:33 -0700
Hi,
I am working with ADO to connect to the Jet 4.0 engine to get a
dataset for
a csv file.
My connection string is:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=%s;Extended
Properties="text;
HDR=%s;FMT=Delimited"
I am also using a Schema file that looks like this:
[MyFile.csv]
Format=Delimited(;)
ColNameHeader=True
MaxScanRows=0
The problem is that when I have a file with headers and I define
HDR=Yes in the connect string
and ColNameHeader=True in the schema file, the file is read in
properly, the header is also fine, but I get a string datatype in my
ado dataset for every column regardless of what information is stored
in the column ( integer, date, etc. ).
Now when I take the same file and remove its header row and I define
HDR=No in the connection string and ColNameHeader=false in the schema
file,
only the first 25 rows are scanned so columns where the first 25
entries are integers and the 26th entry is a string, is given a null
value for the 26th entry.
It almost seems like only the first row is scanned to determine the
datatype!??
I have also changed the ImportMixedTypes registry entry in the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Text
to the value: Text
When I change MaxScanRows to MaxScanRows=100 Everything works fine.
I think I've read almost every post about maxscanrows...
PLEASE HELP!
Payman
- Next message: Developer: "Re: Difference between adDate and adDBDate?"
- Previous message: Jerry Pisk: "Re: How to make a numbering field to a field selection in SQL?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|