Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Return the Record_ID (primary key) with SQL-7


Message #1 by "Hubert" <hasp@m...> on Fri, 17 Nov 2000 21:48:57 -0000
Hi



When I create a new record (with MS-SQL-7) 'new + update', I want to

retrieve the primary key value (Record_id).



Is there any good way to do this ?



Hubert

Message #2 by "Dave Sussman" <davids@i...> on Tue, 21 Nov 2000 08:57:11 -0000
Is this an identity field? If so you'll need to use a server-side keyset

cursor, and the id will automatically be available.



Dave





"Hubert" <hasp@m...> wrote in message news:20379@a..._databases...

>

> Hi

>

> When I create a new record (with MS-SQL-7) 'new + update', I want to

> retrieve the primary key value (Record_id).

>

> Is there any good way to do this ?

>

> Hubert

>

>





Message #3 by "Toby Anscombe" <tanscombe@m...> on Tue, 21 Nov 2000 10:44:47 -0000
why not just use 

return @@Identity



-----Original Message-----

From: Dave Sussman [mailto:davids@i...]

Sent: 21 November 2000 08:57

To: ASP Databases

Subject: [asp_databases] Re: Return the Record_ID (primary key) with

SQL-7





Is this an identity field? If so you'll need to use a server-side keyset

cursor, and the id will automatically be available.



Dave





"Hubert" <hasp@m...> wrote in message news:20379@a..._databases...

>

> Hi

>

> When I create a new record (with MS-SQL-7) 'new + update', I want to

> retrieve the primary key value (Record_id).

>

> Is there any good way to do this ?

>

> Hubert

>

>




  Return to Index