Nugs
asked on
Using Visual Studio TableAdapter wizards to do insert inot multiple tables at once...
Afternoon guys and gals,
I wanted some information on inserting records into multiple tables at one time. Specifically doing this using the Visual Studio TableAdapter wizards.
Currently i am doing the inserts separately, which works fine, but if there is any failure between inserts one table will be missing a require row.
Any tutorials or help on how to do this using visual studio.
Thanks,
Nugs
I wanted some information on inserting records into multiple tables at one time. Specifically doing this using the Visual Studio TableAdapter wizards.
Currently i am doing the inserts separately, which works fine, but if there is any failure between inserts one table will be missing a require row.
Any tutorials or help on how to do this using visual studio.
Thanks,
Nugs
ASKER
??
Ok let me try explain again, i think i have been very misunderstood :)
I'm using Visual Studios TableAdapter wizard, this wizard build SQL statement for use along with all the insert, update, etc... statements.
Here is the select statement it generates:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
SELECT TBL_CUSTOMERDETAILS.*, TBL_CUSTOMERAUTH.*, TBL_CUSTOMERSETTINGS.*
FROM TBL_CUSTOMERDETAILS INNER JOIN
TBL_CUSTOMERAUTH ON TBL_CUSTOMERDETAILS.FLD_CU STOMERID = TBL_CUSTOMERAUTH.FLD_CUSTO MERID INNER JOIN
TBL_CUSTOMERSETTINGS ON TBL_CUSTOMERDETAILS.FLD_CU STOMERID = TBL_CUSTOMERSETTINGS.FLD_C USTOMERID
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- -
So i guess to make my question a simple one... Can you do a insert on a joined tableadapter through visual studio?
Nugs
Ok let me try explain again, i think i have been very misunderstood :)
I'm using Visual Studios TableAdapter wizard, this wizard build SQL statement for use along with all the insert, update, etc... statements.
Here is the select statement it generates:
--------------------------
SELECT TBL_CUSTOMERDETAILS.*, TBL_CUSTOMERAUTH.*, TBL_CUSTOMERSETTINGS.*
FROM TBL_CUSTOMERDETAILS INNER JOIN
TBL_CUSTOMERAUTH ON TBL_CUSTOMERDETAILS.FLD_CU
TBL_CUSTOMERSETTINGS ON TBL_CUSTOMERDETAILS.FLD_CU
--------------------------
So i guess to make my question a simple one... Can you do a insert on a joined tableadapter through visual studio?
Nugs
ASKER
Or do i have to do seperate INSERTS into each table?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the advice Bob... Much appreciated...
Nugs
Nugs
I not sure that I understand, so while I would suggest a try/catch block, I wouldn't know where and when to use it.
Bob