title: How does one check for null or an empty result set with MySQL C++ connector?
body: <p>In the following code, the intention is to check for null,but the code keeps throwing exception. </p>
  
  <pre><code> pstmt = con-&gt;prepareStatement("SELECT id FROM test ORDER BY id ASC");
   res = pstmt-&gt;executeQuery();
   res-&gt;next();
   if(res-&gt;isNull(1))
   {
       cout &lt;&lt; " In null";
   }
   else
   {
       cout &lt;&lt; " Is not Null";
   }
  </code></pre>
  
  <p>How does one check for null or an empty result set?</p>