Avatar of Nugs
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
.NET ProgrammingC#

Avatar of undefined
Last Comment
Nugs

8/22/2022 - Mon
Bob Learned

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
ASKER
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_CUSTOMERID = TBL_CUSTOMERAUTH.FLD_CUSTOMERID INNER JOIN
                      TBL_CUSTOMERSETTINGS ON TBL_CUSTOMERDETAILS.FLD_CUSTOMERID = TBL_CUSTOMERSETTINGS.FLD_CUSTOMERID
---------------------------------------------------------------------------------------------------------------------

So i guess to make my question a simple one... Can you do a insert on a joined tableadapter through visual studio?

Nugs
ASKER
Nugs

Or do i have to do seperate INSERTS into each table?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Bob Learned

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER
Nugs

Thanks for the advice Bob... Much appreciated...

Nugs