Error while updating data with dataadapter.update(datatable), mysql

Hello experts!

I have stucked with my app. I have installed mysql driver and tried to use tableeditor sample from mysql ab. The problem is that it doesn't update data in tables :/

My code is:

            con = New MySqlConnection(conStr)
            con.Open()

            tbl = New DataTable

            da = New MySqlDataAdapter("SELECT * FROM " + TableName, con)

            da.Fill(tbl)
            datagrid.DataSource = tbl

until now everything works fine. but when I try to update changes with code:

        Dim Changes As DataTable = tbl.GetChanges
        da.Update(tbl)
        tbl.AcceptChanges()

I receive error message, whitch says that I need a proper UpdateCommand while sending rows with changed or new rows. I don't know why it doesn't work.

help, please :)
klm-softAsked:
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.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
you have to define the updatecommand of the dataadapter:
http://dev.mysql.com/doc/refman/5.1/en/connector-net-examples-mysqldataadapter.html
0
klm-softAuthor Commented:
I did as you suggested, but nothing has changed. I did everything as in example :(
0
ercat1Commented:
I have the exact same problem. What are we not doing right?????
0
klm-softAuthor Commented:
I gave up abd bought MS VS2008 :) Do the same. Now I update database with no problems :)
0
Computer101Commented:
PAQed with points refunded (100)

Computer101
EE Admin
0

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
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
MySQL Server

From novice to tech pro — start learning today.