By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,659 Members | 910 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,659 IT Pros & Developers. It's quick & easy.

insert data from stored procedure into local access 2003 table

P: n/a
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can
somebody provide an example?

Thanks&regards!
Peter

Jun 12 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can
somebody provide an example?

Thanks&regards!
Peter


What do you mean by "stored procedure"? Are you running code? More info
required. :-)

Keith.
www.keithwilby.com
Jun 12 '06 #2

P: n/a
Sry for the confusion, thought that it was clear enough ....

I am running a stored procedure on a sybase server and need the results
from the stored procedure in a local access table.

Is it possible to run the stored procedure from Access and insert the
result from the stored procedure into a local table?

Please let me know if you need further details...

thx&regards!

Keith Wilby wrote:
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can
somebody provide an example?

Thanks&regards!
Peter


What do you mean by "stored procedure"? Are you running code? More info
required. :-)

Keith.
www.keithwilby.com


Jun 12 '06 #3

P: n/a
Yes it is.

You create your local table
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in an append query to append to your
local table.

Or
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in a make table query to create your
local table.

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can
somebody provide an example?

Thanks&regards!
Peter

Jun 12 '06 #4

P: n/a
Hi Terry,

thx for the mail. Could you please provide some coded example?

Thx&regards,
Peter
Terry Kreft wrote:
Yes it is.

You create your local table
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in an append query to append to your
local table.

Or
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in a make table query to create your
local table.

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can
somebody provide an example?

Thanks&regards!
Peter


Jun 14 '06 #5

P: n/a
Well there isn't really any code.

Asumng you have pubs database on SQL Server

Create a new query
Cancel the tables dialog box
Go to the Query menu and choose PassThrough
Put the SQL in
SELECT * from authors
Open the properties dialog and enter a valid ODBC connection string
Test the query and save when it works (qPassThrough)

Create a new query
Select qPassThrough from the dialog
Add all the fields to the grid
Go to the Query menu and choos Make Table
Enter a name for the new table (dbo_authors)
Run the query (you can check the SQL to see what is produced)
Save the Query (qmDbo_Authors)

Check the dbo_authors table has been created

VBA code to run this then becomes something like

Function MakeDbo_Authors()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb
Set qdf = db.QueryDefs("qmDbo_Authors")
qdf.Execute

Set qdf = Nothing
Set db = Nothing
End Function

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi Terry,

thx for the mail. Could you please provide some coded example?

Thx&regards,
Peter
Terry Kreft wrote:
Yes it is.

You create your local table
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in an append query to append to your local table.

Or
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in a make table query to create your local table.

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
Hi,

I am trying to select some data through a stored procedure and would
like to store the result in a local access table. Is that possible? Can somebody provide an example?

Thanks&regards!
Peter

Jun 14 '06 #6

P: n/a
thx a lot!

Terry Kreft wrote:
Well there isn't really any code.

Asumng you have pubs database on SQL Server

Create a new query
Cancel the tables dialog box
Go to the Query menu and choose PassThrough
Put the SQL in
SELECT * from authors
Open the properties dialog and enter a valid ODBC connection string
Test the query and save when it works (qPassThrough)

Create a new query
Select qPassThrough from the dialog
Add all the fields to the grid
Go to the Query menu and choos Make Table
Enter a name for the new table (dbo_authors)
Run the query (you can check the SQL to see what is produced)
Save the Query (qmDbo_Authors)

Check the dbo_authors table has been created

VBA code to run this then becomes something like

Function MakeDbo_Authors()
Dim db As DAO.Database
Dim qdf As DAO.QueryDef

Set db = CurrentDb
Set qdf = db.QueryDefs("qmDbo_Authors")
qdf.Execute

Set qdf = Nothing
Set db = Nothing
End Function

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
Hi Terry,

thx for the mail. Could you please provide some coded example?

Thx&regards,
Peter
Terry Kreft wrote:
Yes it is.

You create your local table
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in an append query to append to your local table.

Or
You create a passthrough query to run your SPROC make sure the
ReturnsRecords property is true.
Then you use the passthrough query in a make table query to create your local table.

--

Terry Kreft
"Peter Neumaier" <Pe************@gmail.com> wrote in message
news:11**********************@f6g2000cwb.googlegro ups.com...
> Hi,
>
> I am trying to select some data through a stored procedure and would
> like to store the result in a local access table. Is that possible? Can > somebody provide an example?
>
> Thanks&regards!
> Peter
>


Jun 15 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.