INSERT data to MS Access via SQL?

CliffHanger9

zigga zigga
Local time
Today, 10:08
Joined
Nov 1, 2004
Messages
20
HI all-

I have a list of INSERT statements (SQL DML) and I wish to insert this data into an MS Access 2000 table

Unfortunately I cannot find a mechanism to accomplish this in Access. Does one exist? How can I import this data into access in a SQL format?

Thanks in advance!
 
The insert SQl is the same as the append query in MS Access

You might want to create a link to your server tables than create an append query with the Access table as the receiving table.

Ask clip - How to append data OR Append Query
 
use ODBC data sources on ur control panel and add microsoft ODBC for Oracle.
then create a SQL pass-through query in Access and in the ODBC conn string property give the ODBC name u created in the control panel.

may be this work. try it urself as i didn't have SQL on my pc. see help by clicking F1 on connect string property of SQL pass-through query.
 
create a SQL pass-through query
A pass-through query won't work.


CliffHanger9,
Are you asking how to import the SQL strings and turn them in to Access queries? If there're too many to cut and paste, you can do that with VBA. Create a code loop that reads your file or files and creates querydef from them to add to the querydef collection. Keep in mind that Access SQL is probably slightly different from any SQL created for a different RDBMS so your imported SQL is unlikely to work.
 
Pat Hartman said:
A pass-through query won't work.


CliffHanger9,
Are you asking how to import the SQL strings and turn them in to Access queries? If there're too many to cut and paste, you can do that with VBA. Create a code loop that reads your file or files and creates querydef from them to add to the querydef collection. Keep in mind that Access SQL is probably slightly different from any SQL created for a different RDBMS so your imported SQL is unlikely to work.

no i am not trying to run queries. I am trying to populate an Access table with SQL statements.

I had a file continaing INSERT statements with the data embedded in them and was looking for a place to put those INSERTs but apparently there isnt one. I have come up with an alternate process for my problem using SQL Plus and Oracle..

Thanks for the replies though. ROCK ON :cool:
 
Cliff,

If you're still facing this, it should be really easy to read the file and
pass the strings to:

DoCmd.RunSQL YourStringReadFromTheFile

Wayne
 

Users who are viewing this thread

Back
Top Bottom