
How to see first line as data with ADO+ODBC/Microsoft Text Driver
Egbert -
Yes, I have SCHEMA.INI. I understand the concept. When I import
this text file via Access, it pulls it in correctly, first line
as data, not field names. When done from a script using ADO it
does not use SCHEMA.INI.
http://support.microsoft.com/support/kb/articles/Q233/3/18.ASP says
ADO does not use schema.ini. It also says "The first line in the
delimited text file will be used by ADO for column names. If you
don't want to have column names in the file, then you must leave
the first row blank; otherwise the first row will be used by ADO
as a source for column names and your RecordCount will be short by
one." This is really the pits. I was hoping someone would have
found a way around this. The Q-articles are not always 100%
accurate when it comes to what you can't do based on past
experience.
Ultimately this is working through ODBC, and there may be a way to
communicate something like Extended Properties to the connection
object, if I knew what the right word was to use. I can't believe
that in the general design spirit of ADO to expose ODBC drivers, and
to embrace the diversity, there is not SOME WAY to get unique driver
properties through to the ODBC driver. I'm still betting that there
is a way to tailor the text driver operating parameters from ADO.
Let us know if you have discovered how.
--
______________________________________________________________________
Lee Gillie, CCP Remove NOSPAM to E-Mail
Online Data Processing, Inc. - 3501 N. Haven - Spokane, WA 99207-8500
Quote:
>OK
>you have SCHEMA.INI
>Use this if the table for instance is yourtable.csv
>[yourtable.csv]
>colnameheader=false
>DateTimeFormat=ddmmyy
>Format=CSVDelimited
>MaxScanRows=0
>CharacterSet=ANSI
>> Is there any way to see first row as data, rather than column names,
>> when using Microsoft Text Driver with ADO?
>> Trying to avoid having to make changes to the source text file, which
>> is has comma separated values, but has a ".txt" file extension.
>> Apparently when used with ADO the SCHEMA.INI file is not used.
>> This is VBS invoked from CSCRIPT if it makes a difference.
>> --
>> ______________________________________________________________________
>> Lee Gillie, CCP Remove NOSPAM to E-Mail
>> Online Data Processing, Inc. - 3501 N. Haven - Spokane, WA 99207-8500