473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9905
"Peter Neumaier" <Pe************ @gmail.com> wrote in message
news:11******** **************@ f6g2000cwb.goog legroups.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.goog legroups.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.goog legroups.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.goog legroups.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("q mDbo_Authors")
qdf.Execute

Set qdf = Nothing
Set db = Nothing
End Function

--

Terry Kreft
"Peter Neumaier" <Pe************ @gmail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.goog legroups.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("q mDbo_Authors")
qdf.Execute

Set qdf = Nothing
Set db = Nothing
End Function

--

Terry Kreft
"Peter Neumaier" <Pe************ @gmail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.goog legroups.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
9328
by: aaapaul | last post by:
Hallo ! I have a Table with a column "ordernumber" ordernumber A12 A45 A77 A88
1
3717
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 module: strSQL = "CREATE TABLE #tempTableName ("TempID int NOT NULL IDENTITIY (1,1) PRIMARY KEY, Field1 int...) CurrentProject.Connection.Execute strSQL,,adCmdText so far so good...
6
2361
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 parameters. It returns my error text message in another output parameter as "ok", which is the value that is set in the stored procedure prior to doing the insert. It returns my var for @@rowcount as 1. However, the record does not get into the table. ...
3
5158
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 sqldatasource control, there is no need of opening and closing a connection. Also there is no need to write connection string. When i am selecting table from sqldatasource and writing insert statement in C# code, its working fine. When I am...
1
2097
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? Secondly, can I put in multiple SQL statements in a procedure in Access? Please let me know. Thanks for your help.
4
1946
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
2517
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 the MS Access 2003 table from MS Excel 2003 spreadsheets via VBA code. I’m looking for recommendations on how to advance the version number as data is loaded into the table. For example, on day 1 we would load the following records: ...
1
1817
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 CustomerName SaleRepName ContractNumber ContractDate I need to include data that shows the products and their respective serial numbers owned by the customer. A customer can have multiple products. For example:
0
2942
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 I have to do? To add OpenFileDialog in order to choose the xml file, then parse it and make it as one string then pass it to the sp (The SQL stored procedure gets "XML" parameter and not a varchar(max)). Or is there a simple way that just send the...
0
8832
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9566
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8256
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.