Get Primary Key

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.
 
L

Leon Shaw

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.)
 
L

Leon Shaw

But how will it get the current member primary key value when other records
also exist in that table?
 

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

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,144
Latest member
KetoBaseReviews
Top