Last post Aug 02, 2010 12:49 PM by deminpa
Jul 30, 2010 02:39 PM|deminpa|LINK
I have code which was working just fine, but now the GetInsertCommand is failing. Now I get the following error:
Dynamic SQL generation for the UpdateCommand is not supported against a SelectCommand that does not return any key column information.
The database has not change and neither has the dataset. I've tried dropping the tables (there are two so far) and re-creating them with the primary key creation as part of the create table script. I'm working in Visual Studio 2005 and using OracleClient
I've come across posts dated before 2007 that recognized this as issue with framework 1, but nothing more recent than that.
For some tables, the comand builder has no problem with creating the insert command, but not for the two I'm working with now.
Has anyone else run into this issue and, more importantly, how do I fix it?
Jul 30, 2010 05:19 PM|ajay_gautamji|LINK
Refer these links
Ensure that your table consists of a primary key.
Visit http://www.articlescloud.com/ for worked examples.
Aug 02, 2010 12:49 PM|deminpa|LINK
The problem turned out to be corrupt synonyms. We applied keys to a set of tables on one database, but not on a database with table of the same name. After applying the keys to the one instance, we should have dropped all synonyms and re-created them.