Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Improving speed to Import a text file into Access DB AD
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00601606
Message ID:
00603198
Views:
33
Hi Karriem,
I'm interesting in your code, and I gave it a try. My code is:
Dim dbsWQ As New ADODB.Connection, strSQL As String, strCn As String

' Prepare to import CSV files
strCn = "Driver={Microsoft Text Driver (*.txt; *.csv)};" & _
"DBQ={C:\Documents and Settings\Elharissa Robert\Desktop\Test_Speed\};" & _
"DefaultDir={C:\Documents and Settings\Elharissa Robert\Desktop\Test_Speed\};" & _
"Uid=Admin;Pwd=;"
dbsWQ.Open strCn

strSQL = "SELECT * INTO [{RobertTemp}] IN '{new_ave_maria2000.mdb}'" & _
" FROM {tmliss.txt}"
dbsWQ.Execute strSQL

dbsWQ.Close
What's wrong with this code?
at line dbsWQ.Open strCn I got an error :
[Microsoft][ODBC Text Driver]’(unknown)’ is not a valid path. Make
ure that the path name is spelled correctly and that you are
Connected to the server on which the file resides.

Could you please correct me?
Is it necessarily to have MSAccess on the client machine?
My text file doesn’t have a fixed length of record should it works all the same?
What is the Schema.ini file, should I have it? What I need is to have one text field for all the records.
Could you please put me on the good way?
Thanks
Robert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform