Solved

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

Posted on 1998-11-05
1
229 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

777 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