Import Into Access Tables Using ODBC

ishaywei

New member
Local time
Today, 00:52
Joined
Nov 29, 2006
Messages
4
Hi,

I want to import into an MDB table a csv file.

I'm trying to use the bulk copy table.

my function is:

SQL = "SELECT * INTO [my_table] FROM [ODBC;Driver=Micrsoft text driver (*.txt; *csv) ;Dbq=c:\\;Extensions=asc,csv,tab,txt;].table.csv"

db.OpenEx( "Driver=Microsoft Access Driver .mdb);DBQ=c:\\access.mdb;", CDatabase::noOdbcDialog );

db.ExecuteSQL( SQL );

when i run this function i get an error : "You cannot use ODBC to import from, export to, or link an external Microsoft Jet or ISAM database table to your database"

when i try to import in the same way a dbf file (insted the csv file) with VFP it's working well.

what seems to be the problem? how can i fix it? or if some one know how can i import a large csv file into access DB in an efficient diffrent way?

thanks ishay
 
csv import

You don't need to go through ODBC to import or Link a .csv file. Select File Menu, point to Get External Data and then click Import or Link Table option. Browse to your .csv file. select Text Files (*.txt;*.csv;*.tab;*.asc) in the Files of Type box and click Link (if you are linking the data). You will see the Delimited data type selected in the Link Wizard. Click Next. In the next window of the wizard put a check mark in the First Row Contains Field Names and click Finish. The data will be linked to your Microsoft Access database.
 
I cant use the the Access app, because i need to import the data via c++ code. and in the furtre i need to distribute my software to my clients so i cant even use an API the access install. what I can do is to use the ODBC jet engine - free ODBC engine
 

Users who are viewing this thread

Back
Top Bottom