C
COTA
Is there a way to control how the first row of a linked file is handled
using DAO? When I connect to a file using the Link Text Wizzard the "First
Row Contains Field Names" is unchecked. This results in generic column
names. When I attempt to connect to the same file using DAO the first data
row is used as column names. I would like to control this behavior. Any
advice would be appreciated. Thanks.
For what it's worth here's an example of the code I'm using.
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
Set tdf = db.CreateTableDef("TestTable")
tdf.SourceTableName = "TestData.csv"
tdf.Connect = "text;database=j:\TestDir\"
db.TableDefs.Append tdf
using DAO? When I connect to a file using the Link Text Wizzard the "First
Row Contains Field Names" is unchecked. This results in generic column
names. When I attempt to connect to the same file using DAO the first data
row is used as column names. I would like to control this behavior. Any
advice would be appreciated. Thanks.
For what it's worth here's an example of the code I'm using.
Dim db As Database
Dim tdf As TableDef
Set db = CurrentDb
Set tdf = db.CreateTableDef("TestTable")
tdf.SourceTableName = "TestData.csv"
tdf.Connect = "text;database=j:\TestDir\"
db.TableDefs.Append tdf