Solved

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

Posted on 1998-11-05
1
250 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

688 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