tags:

views:

284

answers:

1

I am trying to do ODBC import with DSN-Less connection(using text driver). Is there any way to tell SQLDriverConnect to set COLNAMEHEADER=yes/no? OR I need to use schema.ini to do it? Actually i don't want to create schema.ini manually, Can I use SQLConfigDataSource for dsn less connection? I haven't found any docs regarding this.

Thanks in advance, Manoj

A: 

Create the schema.ini programatically before you open the text file via SQLDriverConnect. I don't see how SQLConfigDataSources can help you here, as it is specifically intended for manipulating DSNs and you don't have one.

anon
So there is no way to give this option with out schema.ini? http://msdn.microsoft.com/en-us/library/ms715389(VS.85).aspx Why can't I specify COLNAMEHEADER in SQLDriverConnect?
Manoj
Because SQLDriverConnect parameters describe the connection, not the data.
anon