Click here to Skip to main content
15,896,492 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys
I have done some MySQL connection
SQL
MySQLConnection.ConnectionString = "server=127.0.0.1;Port=3307; User ID=root; password=qweqwe; database=test"

      MySQLConnection.Open()
      sql = "SELECT * FROM users where users.user = '" + TextBox1.Text + "';"

      da = New MySqlDataAdapter(sql, MySQLConnection)

      da.Fill(ds, "Mysql")
      MySQLConnection.Close()

but after this when I write
da.Update(ds, "Mysql")

I get an error "Update requires a valid UpdateCommand when passed DataRow collection with modified rows."
Can you help me and say what I am doing wrong thank you :)
Posted

1 solution

Entering your error message in Google[^] yielded quit a few result.

The top few (this[^] on for example) suggest you check to see whether you have defined a primary key in the table you are using.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900