468,740 Members | 1,931 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,740 developers. It's quick & easy.

Column Names with Embedded Spaces with the Text Driver

I am trying to use the Microsoft Text Driver to access data in a text
file via ODBC calls. Everything has worked fine so far. I am now trying
to implement support for a file that has a special column name line as
the first line. A monkey wrench thrown in is that one column must
contain a mix of numbers and values that are an actual valid date. The
main reason to use a schema.ini is when you do not have this column
name line and you need to assign names to the input columns. But if I
do not specifiy the column data types in the schema.ini and the first
few rows contain dates, the datatype is then assumed to be date. And
when it hits a non-date value the code blows up. So I am specifying the
column names and datatypes using the column names in the first line of
the file and setting all columns to Text. But now, when I try to
reference a field in the input stream with code like this:

dim fieldname as string = "Dist No"


Apparently it doesn't like the value of the field name to contain
spaces. I know I can reference the data with:

filereader("Dist No").tostring

That works fine, but I need to get the field name from a variable.

Is there anyway to do what I need to do?

Dec 13 '05 #1
0 971

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Joe Gazda | last post: by
2 posts views Thread by Bart Van der Donck | last post: by
11 posts views Thread by Steven Smith | last post: by
3 posts views Thread by Chris Sharman | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.