|
-
Sep 24th, 2007, 08:23 AM
#4
Re: [2005] Datagridview update error
If your TableAdapter has no UpdateCommand then either your query does not return a primary key or it contains join. Either way the wizard cannot generate an UpdateCommand automatically.
How did you create this TableAdapter? Does it correspond directly to a table in your database? If so then that table must not have a primary key. How can you update a record if you can't uniquely identify it? How can you uniquely identify a record without a primary key?
If you created the query yourself then you must either have not included the table's primary key or else the query references more than one table. In that case you will have to create the UpdateCommand yourself because the wizard can't do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|