Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing Multiple values from a sql query

Status
Not open for further replies.

WOTRAC

MIS
Nov 22, 2002
36
GB
Hi

I want to run a sql query against an MS access database and then pass some of the slected values through a Com
Object into a SQL Server Database.

As I am a little green around the gills, could anyone point me in the right direction.
I was considering an ADO connection to the MS Access database as a start.

 
The fastest solution that I know is to let Access do the job instead of going for ADO.
Create a Front End Access database. Create linked tables in this FE program both for SQL tables and for Access Back End tables.
You can use the code below to append to SQL table
DoCmd.RunSQL "INSERT INTO MySQLTable( field1, field2, field3) SELECT field1, field2,field3 from MyAccessTable where " & Mycondition

Best of Luck
 
Sorry it has to Com due to the nature of the SQL database and the business rules that apply.

I have used an ADO recordset to solve the problem, but thanks for your response, it was appreciated.


Paul


 
Sorry it has to be Com due to the nature of the SQL database and the business rules that apply.

I have used an ADO recordset to solve the problem, but thanks for your response, it was appreciated.


Paul


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top