Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php on line 1077

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php on line 1077

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php on line 1079

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php on line 1079

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php on line 1079

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831

Warning: Cannot modify header information - headers already sent by (output started at /home3/weo2000/public_html/offeman.com/wp-content/plugins/backup/com/core/functions.php:1077) in /home3/weo2000/public_html/offeman.com/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":91,"date":"2010-11-21T18:49:32","date_gmt":"2010-11-21T18:49:32","guid":{"rendered":"http:\/\/www.offeman.com\/2010\/11\/21\/NeverForgetThePrimaryKeyPKOnATable.aspx"},"modified":"2010-11-21T18:49:32","modified_gmt":"2010-11-21T18:49:32","slug":"never-forget-the-primary-key-pk-on-a-table","status":"publish","type":"post","link":"https:\/\/offeman.com\/never-forget-the-primary-key-pk-on-a-table\/","title":{"rendered":"Never forget the primary key (PK) on a table!"},"content":{"rendered":"

Want to kill an hour?  Forget to include a primary key constraint on a SQL table and use the Visual Studio auto-generated dataset.<\/p>\n

You will get this error when issuing the Update() command on an adapter:<\/p>\n

\u201cUpdate requires a valid UpdateCommand when passed DataRow collection with modified rows.\u201d<\/p>\n

If you look at the code in yourdataset.Designer.cs file for <\/p>\n

private void <\/span>InitAdapter()\n<\/font><\/pre>\n

it will not include the necessary INSERT INTO, DELETE FROM and UPDATE commands\u2014it will only include the INSERT INTO. Of course it makes sense that MSDataSetGenerator would not know how to generate proper SQL code without a primary key\u2026 But all the code behind code makes debugging difficult! <\/p>\n","protected":false},"excerpt":{"rendered":"

Want to kill an hour?  Forget to include a primary key constraint on a SQL table and use the Visual Studio auto-generated dataset. You will get this error when issuing the Update() command on an adapter: \u201cUpdate requires a valid UpdateCommand when passed DataRow collection with modified rows.\u201d If you look at the code in […]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/posts\/91"}],"collection":[{"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/comments?post=91"}],"version-history":[{"count":0,"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/posts\/91\/revisions"}],"wp:attachment":[{"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/media?parent=91"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/categories?post=91"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/offeman.com\/wp-json\/wp\/v2\/tags?post=91"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}