I have two (parent-child) tables that are bound by a primary key (PK)/foreign key (FK) relation.each PK is identity (idStudent and idBac)
to insert data, i'm using an little application in c# i programmed myself where i insert these columns for the Student table: F_Name, L_Name, Age, Mobile, Adresse, City ,and ( i don't know how to handle the idBac wich is foreign key of the other table
wich still not inserted yet)
for the table Bac, i insert section, school, and city.
what i want is when i click on "OK" button, the idBac ,wich is a foreign key of the other table (BAC), receives the same idBac given the moment i inserted the BAC informations too ...
i don't have any problem wich ado.net ...i just want the right query/procedure.
thanks in advance and sorry for my english, it's not my mother tongue.
View Complete Post