Code for inserting rows from a stored procedure into a Access Table

R

Rob

I would like to know how to insert rows from a stored procedure into a local
Access table...

I do not want to link to a view or table to get the data.

The stored procedure is simply a select statement...

Thanks !
 
R

Rick Brandt

Rob said:
I would like to know how to insert rows from a stored procedure into
a local Access table...

I do not want to link to a view or table to get the data.

The stored procedure is simply a select statement...

Thanks !

Call the SP from a passthrough query. Use the PT query as the input to an
Append query.
 
R

Rob

Thanks Rick,

I would like to do this all in code.... not via designer.... know any good
links showing example code ?
 
R

Rob

Using DAO... am I on the right track ?

created a storedproc called sp consisting of a select statement

created a pass thru query in Access consisting of EXEC sp


Dim db as database
Dim qdf as querydef
dim strConn as string

strConn ="ODBC;Data Source=Server:Initial Catalog=DatabaseName;Integrated
Security=True"

set db = CurrentDb
set qdf = db.QueryDefs("query")

qdf.Connect= strConn
qdf.ReturnsRecords=True

' now how to insert the data in the sp into a local Access table named tbl ?


Thanks !
 
R

Rob

Never mind... I figured it out...

Thanks...


Rob said:
Using DAO... am I on the right track ?

created a storedproc called sp consisting of a select statement

created a pass thru query in Access consisting of EXEC sp


Dim db as database
Dim qdf as querydef
dim strConn as string

strConn ="ODBC;Data Source=Server:Initial Catalog=DatabaseName;Integrated
Security=True"

set db = CurrentDb
set qdf = db.QueryDefs("query")

qdf.Connect= strConn
qdf.ReturnsRecords=True

' now how to insert the data in the sp into a local Access table named tbl
?


Thanks !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top