• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

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

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?


1 Solution
Victor SpiridonovCommented:
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")
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now