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

Similar Threads

Changing values 1
Gridview Problems with asp.net 2.0 1
sorting a report with two tables 1
Pimary key when consolidated 5
Simple query problem 2
@@identity 2
one-to-many problem 2
Combine 2 tables in Access 2000 1

Top