{"id":3902,"date":"2014-03-30T06:18:35","date_gmt":"2014-03-30T06:18:35","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/querying-with-adodbconnection-execute-collection-of-common-programming-errors\/"},"modified":"2014-03-30T06:18:35","modified_gmt":"2014-03-30T06:18:35","slug":"querying-with-adodbconnection-execute-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/querying-with-adodbconnection-execute-collection-of-common-programming-errors\/","title":{"rendered":"Querying with ADODB::Connection.Execute()-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to query an Access database from C++ using the ADODB::Connection class. The<\/p>\n<p>ADODB::Recordset class that<\/p>\n<p>ADODB::Connection.Execute() is fetching into shows this error in its Bookmark property:<\/p>\n<p>Here&#8217;s the code snippet:<\/p>\n<p>\/***************************************\/<\/p>\n<p>private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {<\/p>\n<p>ADODB::Connection ^ conADO;<\/p>\n<p>String ^ strConnection, ^ strStatement;<\/p>\n<p>Object ^ obj = gcnew Object;<\/p>\n<p>conADO = gcnew ADODB::Connection;<\/p>\n<p>strConnection = (&#8220;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&#8217;C:\\\\Users\\\\dsk\\\\Documents\\\\mydb.accdb&#8217;;Persist Security Info=False&#8221;);<\/p>\n<p>strStatement = &#8220;select * from movies;&#8221;;<\/p>\n<p>conADO-&gt;Open(strConnection, L&#8221;&#8221;, L&#8221;&#8221;, 0);<\/p>\n<p>ADODB::Recordset ^ pRecordset = gcnew ADODB::Recordset;<\/p>\n<p>pRecordset = conADO-&gt;Execute(strStatement, obj, 0); \/\/the message shows up after this statement executes.<\/p>\n<p>\/*******************************************\/<\/p>\n<p>Any ideas on how to do this query properly are appreciated.<\/p>\n<p>Darrin<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to query an Access database from C++ using the ADODB::Connection class. The ADODB::Recordset class that ADODB::Connection.Execute() is fetching into shows this error in its Bookmark property: Here&#8217;s the code snippet: \/***************************************\/ private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { ADODB::Connection ^ conADO; String ^ strConnection, ^ strStatement; Object ^ obj = gcnew Object; conADO [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3902","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3902"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3902\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}