Updating tables

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
classicmydac
Posts: 38
Joined: Fri 23 Dec 2005 11:51

Updating tables

Post by classicmydac » Thu 13 Jul 2006 18:03

I have been using the Picture example and adapting it to update images and data from pocket pc 2005 to MYSQL tables.

The statement
SELECT * FROM mysqlnet_pictures ORDER BY UID DESC LIMIT 1

limits the amount of information I have to download to 1.

The following works fine on update

Cursor.Current = Cursors.WaitCursor;
if (dataSet.Tables.Count != 0)
mySqlDataAdapter.Update(dataSet, "Table");

However this does not work when the tables have been updated by another user as it creates duplicate UID numbers.

How do I change the above to Insert the new records into the table.

Cheers

SteveW

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 14 Jul 2006 06:13

Another user cannot create duplicate UID numbers because it is the primary key.
Please specify the problem.

Post Reply