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
v2.0.50727.
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?
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.
None
0 Points
2 Posts
OracleDataAdapter GetInsertCommand failing
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 v2.0.50727.
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?
Member
694 Points
268 Posts
Re: OracleDataAdapter GetInsertCommand failing
Jul 30, 2010 05:19 PM|ajay_gautamji|LINK
Refer these links
http://social.msdn.microsoft.com/Forums/en-US/Vsexpressvcs/thread/5dec5633-ac84-48d9-8fd6-5c7601be4ccd
or
Ensure that your table consists of a primary key.
Visit http://www.articlescloud.com/ for worked examples.
Ajay
None
0 Points
2 Posts
Re: OracleDataAdapter GetInsertCommand failing
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.