MySQL Forums
Forum List  »  Newbie

MySQL Database C# - Table update
Posted by: Marco Bürckel
Date: July 27, 2005 05:16AM

Dear members,

I'm working with VS Studio .NET 2003 and C#, and used MySQL succesfuly. As shown in the sample of the MySQL Connector .NET 1.0.4, I created a DataGrid, and linked it with a MySQL table I created.
It works fine, but my problem is: I cannot update the table. As shown in the sample of MySQL, i used:

DataTable changes = myData.GetChanges();
myAdapter.Update(changes);
myData.AcceptChanges();

I renamed the datas for own purposes, however the sense is the same. And now the strange thing: Even the update button in the MySQL sample doesn't work!! Both mine and the sample routine show me the following error:

"MySqlCommandBuilder cannot operate on tables with no unique or key columns"

As I worked in both the sample and my project with my own tables, I got the feeling, that something is wrong with my table. However I set them up pretty regular, as shown in the MySQL Tutorial from the official manual...

CREATE TABLE foo (foo1 varchar(10), foo2 varchar(20).............);

So can you help me please :(
Thank you for taking time

Options: ReplyQuote


Subject
Written By
Posted
MySQL Database C# - Table update
July 27, 2005 05:16AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.