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

  • Thread starter Thread starter Rob
  • Start date Start date
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 !
 
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.
 
Thanks Rick,

I would like to do this all in code.... not via designer.... know any good
links showing example code ?
 
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 !
 
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 !
 
Back
Top