Creating a Linked Table (Linked to TEXT)
Posted on 1998-01-11
I am trying to write code that creates a linked table to a text file. I have already created the code that properly creates the MSysIMexSpecs, and MSYSIMEXColumns so that my import specs. can be used. When I use the following code
Dim tbldef As New TableDef
Dim dbs As Database
Set dbs = wks.OpenDatabase("r:\test.mdb")
tbldef.Attributes = dbAttachedTable
tbldef.Connect = "Text;DSN=ALLETA Link specification;FMT=Delimited;HDR=NO;IMEX=2;DATABASE=C:\Webpages\Database"
tbldef.Name = "ALLETA_LINK"
tbldef.SourceTableName = "ALLETA.TXT"
I get an error on the attributes line. What is the proper way to do this. I am trying to duplicate a database that I created in Access 97, in source code, so that the program can create it at install time.