A
Angelina
Hi,
I have created a Access.adp database (MSDE). I am trying
to create a stored procedure to inssert a row into a
database but i dont know what to do about the Foreign key
value (FK). e.g.
I have 2 tables
Client table
Client ID..........Autonumber
Name...............Char
Address............Char
Booking Table...... Autonumber
Client ID.......... ? (what do i have as a datatype here?
Arrival Date....... Date
Departure Date..... Date
What i want is when i insert a client into the client
table, i want the autonumbver that is generated to be
cascaded into the booking table.
Is this possible?
Or can i create an insert SPROC that will update both
tables at the same time??
How do i get the autonumber generated from the parent
(Primary key holding table) table into the child table
(holding the foreign key)??
can anyone help me or point me to any useful articles?
thx in advance for your help
I have created a Access.adp database (MSDE). I am trying
to create a stored procedure to inssert a row into a
database but i dont know what to do about the Foreign key
value (FK). e.g.
I have 2 tables
Client table
Client ID..........Autonumber
Name...............Char
Address............Char
Booking Table...... Autonumber
Client ID.......... ? (what do i have as a datatype here?
Arrival Date....... Date
Departure Date..... Date
What i want is when i insert a client into the client
table, i want the autonumbver that is generated to be
cascaded into the booking table.
Is this possible?
Or can i create an insert SPROC that will update both
tables at the same time??
How do i get the autonumber generated from the parent
(Primary key holding table) table into the child table
(holding the foreign key)??
can anyone help me or point me to any useful articles?
thx in advance for your help