Solved

Returning Identity column value from a stored Procedure via DAO/JET

Posted on 1998-11-05
1
204 Views
Last Modified: 2008-01-09
I am making some modifications to a legacy application which uses DAO/JET to get to the SQL Server database.  I know how to return an Identity column value from an INSERT query using RDO or ODBC Direct, but I cannot determine how to do this using DAO/JET.  Can someone help?

Thanks,

Steve
0
Comment
Question by:SMSatterfield
1 Comment
 
LVL 7

Accepted Solution

by:
spiridonov earned 50 total points
ID: 1091072
at the end of your stored procedure put SELECT @@identity and call it from Access this way:

dim rs as recordset
dim db as database
.

set rs=db.openrecordset("EXECUTE your_stored_procedure")
ret_Identity=rs.fields(0)
.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Performance is the key factor for any successful data integration project, knowing the type of transformation that you’re using is the first step on optimizing the SSIS flow performance, by utilizing the correct transformation or the design alternat…
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now