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
(I want every transaction to relate to a valid member. Plus, I want this to
happen on a button click event, inside a transaction.)
"S. Justin Gengo" <sjgengoaboutfortunate.com> wrote in message
> It depends on what type of database you are using.
> If it's SQL Server use a stored procedure and try this just after your
> insert statement:
> SELECT Identity AS MemberId
> Unfortunately there is no equivalent for an access database.
> S. Justin Gengo, MCP
> Web Developer
> Free code library at:
> "Out of chaos comes order."
> "Leon Shaw" <vnalitymsn.com> wrote in message
> news:urHJ6dWTDHA.560TK2MSFTNGP10.phx.gbl...> on> > 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>> > submit button click.