hi,
i have this code
the import file is a text file with fixed format. and tbl1 is already created and exists in access db.
i'm getting an error msg because i don't seem to be specifying the import specs correctly. any ideas what the correct syntax of the import specs would be? so that i can automate this function, which is currently is done by access user interface?
i have this code
Code:
Set objConnection = CreateObject("ADODB.Connection")
objConnection.Open _
"Provider = Microsoft.Jet.OLEDB.4.0; " & _
"Data Source = " & db_path
strSQL = "INSERT INTO tbl1 (x1, " & _
"x2, " & _
"x3, " & _
"x4, " & _
"x5, " & _
"x6, " &_
"x7) SELECT * FROM " & _
"[Text;HDR=yes;msysimexspecs=spec1;Database=c:\a_load_file\;FMT=Delimited].test#txt"
objConnection.Execute strsql
i'm getting an error msg because i don't seem to be specifying the import specs correctly. any ideas what the correct syntax of the import specs would be? so that i can automate this function, which is currently is done by access user interface?