MySQL Adapter Update question

I'm using the byteFX derived ASP.NET compliant MySQL components in Visual Studio 2003 to talk to several tables including a coupt of joined tables.  My problem is in updating data and how to form the command text of the Update command for my adapter.  My Select command for instance, is easy
SELECT * FROM table_01t

My Inser Statement is easy

INSERT INTO table_01t (x,y,z) VALUES (Stringx,Stringy,Stringz)

where Stringx, Stringy and Stringz are derived from javascript based controls on a web page and then passed as string to the C# code on the server side.

My update gets tricky, and i'm not certain how to make my update command work properly... The adapter apparently wants it in this form MySQLAdaptert01.Update(DataSet,Tablename); and then somehow uses the update command I've included to update the datatable.  My problem is in generating the update command on the fly so I can update the right table, the right fields and from the right dataset based upon the users inputs.  I'm just not comfortable building the update string when I can't see how it will be used.

I have three tables with 75 columns aggregate(ie 21, 26, 28), and in the worst case scenario, I'd update every field in every table except for the ID strings of each, and in the simplest situation, i'd only be changing 1 field, in one column, in one table.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi preserver3,

have you tried to use OledbCommandBuilder or OdbcCommandBuilder

here is a sample taken from msdn:
Public Shared Function SelectOdbcSrvRows(myConnection As String, mySelectQuery As String, myTableName As String) As DataSet
    Dim myConn As New OdbcConnection(myConnection)
    Dim myDataAdapter As New OdbcDataAdapter()
    myDataAdapter.SelectCommand = New OdbcCommand(mySelectQuery, myConn)
    Dim cb As OdbcCommandBuilder = New OdbcCommandBuilder(myDataAdapter)


    Dim ds As DataSet = New DataSet
    myDataAdapter.Fill(ds, myTableName)

    ' Code to modify data in DataSet here

    ' Without the OdbcCommandBuilder this line would fail.
    myDataAdapter.Update(ds, myTableName)

End Function 'SelectOdbcSrvRows


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
preserver3Author Commented:
MySql.Data.MySqlClient.MySqlCommandBuilder Table_01CommandBuilder = new MySql.Data.MySqlClient.MySqlCommandBuilder(Table_01Adapter,true);

is the command builder native to the MySQL .Net connector and works faster and more reliably than the ole or the odbc.

Thanks, you lead me in the right direction.

sorry, i have not used it and can not say that

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.