Get Primary Key

  • Thread starter Thread starter Leon Shaw
  • Start date Start date
L

Leon Shaw

How do I get the primary key of a record just enter into the database?
Then pass that same primary key ID column value to another table?

Example:
--- Members Table --- ---Transaction Table---
MemberID TranactionID
FirstName MemberID
LastName DateTime
etc. etc.

The transaction table is suppose to get the memberID of the member table on
submit button click.
 
I'm using MS SQL 2000 back end, and asp.net/vb.net/visual studio.net to
program my interface. So all I have to do is create a store procedure to
get the primary key of the members table to pass that value to the
transaction table?
(I want every transaction to relate to a valid member. Plus, I want this to
happen on a button click event, inside a transaction.)
 
But how will it get the current member primary key value when other records
also exist in that table?
 
Back
Top