Last post Jun 22, 2009 12:09 PM by pavan496
Jun 22, 2009 06:17 AM|pavan496|LINK
I am using msaccess 2007 as database and I have two tables say customers and contracts with customers having cid, name as columns and contracts with contractid, date, cid as columns with cid as foreign key. cid and contract id are autonumber.
Now, I have a webpage asking for all the required fields name, date. I need to insert rows in both the tables. as i don't want things to screwup if there are any errors in the middle, i used OledbTransaction.
My problem is that after executing the first command to insert row in the customers table, i need to retrieve the cid from the first table and insert it in the second table. i wrote another method to do the same but as the transaction is not yet committed,
the changes are not reflected. Please help me solve this issue.
Thanks in advance.
Jun 22, 2009 09:07 AM|hans_v|LINK
In this example the command are not wrapped in a transaction, but you can if you want
Jun 22, 2009 12:09 PM|pavan496|LINK