473,401 Members | 2,125 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

insert data from stored procedure into local access 2003 table

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
6 9877
"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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: aaapaul | last post by:
Hallo ! I have a Table with a column "ordernumber" ordernumber A12 A45 A77 A88
1
by: Lauren Quantrell | last post by:
I have read the newsgroups and see this is a common issue but I saw no resolution for it: I have an Access2K frotn end and SQL Server 2K backend. In access, I create a temp table using code in a...
6
by: SandySears | last post by:
I am trying to use a stored procedure to insert a record using VS 2005, VB and SQL Server Express. The code runs without errors or exceptions, and returns the new identifer in the output...
3
by: mahajanvit | last post by:
Hi one and all I got this problem during my project. So in order to solve this I made a very small application. I am trying to insert using SP and sqldatasource control. I know that while using...
1
by: rishhh | last post by:
How do I create a stored procedure in Access database? When i try using the CREATE PROCEDURE Statement in a Query Object, it gives me a sytax error. Is there any other way of creating a procedure? ...
4
by: voroojak | last post by:
hi is there any way to use sql stored procedure in access 2003? i have a tored procedure that want to link it to access database but have no ided that it is possible or not? thanks alot
7
by: AkosBeres | last post by:
I’m in the process of setting a sample local Access table called "Fruits" to store data in the following sample fileds: Week Amount Description Version or sequence The data will be loaded into...
1
by: KrazyKasper | last post by:
MS Access 2003 – table inside a report I have an Access report that I use in a mail merge (export to Excel and then mail-merge into a Word document). The report currently shows: CustomerId...
0
by: pisgasys | last post by:
Hi, I need to send xml file as a parameter to SQL stored procedure from Access VBA form.. I wrote code that handle sending parameters from a textbox input.. but if I need to send xml file, what...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.