@@Identity not using procedure

  • Thread starter Thread starter Paperback Writer
  • Start date Start date
P

Paperback Writer

Hi friends,
Is there a way to get the last code inserted in my database without a
procedure...direct in the code-behind ? some method ? some property ?

Thanks in advance
 
Afraid not. Unless you do something with your Stored proc and using
ExecuteScalar, ASP.NET has no connection to SQL and wouldn't know last
identity.

Sorry. If it were possible, life would be tremendously easy.

Clint Hill
H3O Software
http://www.h3osoftware.com
 
Yes, run a batch like

insert ...;select scope_identity()

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top