c# - error: "select command that does not return any key", but Im sure that Im giving a key -


im trying update table, works fine tables 1 have error:

http://i.stack.imgur.com/yq75b.jpg

(i cant post images sorry)

and have primary key

http://i.stack.imgur.com/u9qjl.jpg

the problem must in table because works other table, tried deleting , creating again primary key column error persist,change column name neither solves it. if use query sql server can find primary key exist:

 select  information_schema.key_column_usage objectproperty(object_id(constraint_name), 'isprimarykey') = 1 

but in update still receive same error:

 sqlconnection con = new sqlconnection(conn1.connectionstring);                     sqldataadapter dacust = new sqldataadapter("select * item", con);                     sqlcommandbuilder cbcust = new sqlcommandbuilder(dacust);                     dacust.update(ds.tables[0]); 

(i'm sending "ds" webserver datagridview item columns match)

as said table "item" cant updated tried tens of other tables without problems, , cant understand i'm doing wrong


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -