{"id":217,"date":"2007-06-14T15:51:06","date_gmt":"2007-06-14T20:51:06","guid":{"rendered":"\/cgi\/wp\/?p=217"},"modified":"2007-06-14T15:51:06","modified_gmt":"2007-06-14T20:51:06","slug":"utility-to-troubleshoot-sql-insert-statements","status":"publish","type":"post","link":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=217","title":{"rendered":"Utility To Troubleshoot SQL INSERT Statements"},"content":{"rendered":"<div class=\"entry\"><font>Today I wrote a Windows application in <strong>C#<\/strong> to help me  troubleshoot <strong>SQL INSERT<\/strong> statements which do not have an equal  number of columns and values. Unfortunately, SQL Server does not provide very  informative error messages. It can be difficult to figure out why an INSERT  statement is invalid when you have a large number of table columns and a long  string of values. My Windows application allows you to paste the SQL statement  into a rich text box. When you click the Parse button it will display the number  of column names and the number of column values so you can easily see if the  counts do not match. It also displays the column names and values in a data grid  view so you can more easily spot the value that does not match up.<\/font><\/p>\n<p><font><img decoding=\"async\" alt=\"Troubleshoot INSERT statement\" title=\"Troubleshoot INSERT statement\" src=\"http:\/\/img153.imageshack.us\/img153\/6905\/troubleshootinsertuy3.gif\" \/><\/font><\/p>\n<p><font>I learned how to use regular expression match collections in writing this  program. I also worked out how to create a dataset programmatically, define its  columns, and add rows of data. <\/font><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today I wrote a Windows application in C# to help me troubleshoot SQL INSERT statements which do not have an equal number of columns and values. Unfortunately, SQL Server does not provide very informative error messages. It can be difficult &hellip; <a href=\"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/?p=217\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"_links":{"self":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/217"}],"collection":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217"}],"version-history":[{"count":0,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions"}],"wp:attachment":[{"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/williamsportwebdeveloper.com\/cgi\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}