November 29, 2004 at 11:07 am
Hello all,
I am a vb newbie and would like to create a simple vb app using VS 2003 .NET. This app would enable users to make changes (updates) to a table with a 4 column primary key through a data grid control.
When I try to use the wizard, I get a message saying that the UpdateCommand could not be created because it couldn't determine how the records were unique.
Is anyone familiar with this problem, and possibly could provide an easy work-around or advise on how to write the UpdateCommand?
Thanks in advance.
November 29, 2004 at 12:53 pm
Update YourTable set f1 = 'UserInput' ... where PkCol1 = ? and PkCol2 = ? and PkCol3 = ? and PkCol4 = ?
The only thing I can think of for the wizard problem is that it cannot find a unique index (or PK) on the table. Make sure you have a pk or unique constraint defined and try again. If it still doesn't work then I guess you'll have to code it by hand like the example above.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply