Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This problem is usually caused by one of the following</p> <ul> <li>null values being returned for columns not set to AllowDBNull</li> <li>duplicate rows being returned with the same primary key.</li> <li>a mismatch in column definition (e.g. size of char fields) between the database and the dataset</li> </ul> <p>Try running your query natively and look at the results, if the resultset is not too large. If you've eliminated null values, then my guess is that the primary key columns is being duplicated.</p> <p>Or, to see the exact error, you can manually add a Try/Catch block to the generated code like so and then breaking when the exception is raised:</p> <p><img src="https://i.stack.imgur.com/HQrHa.png" alt="enter image description here"></p> <p>Then within the command window, call <code>GetErrors</code> method on the table getting the error.<br> For C#, the command would be <code>? dataTable.GetErrors()</code><br> For VB, the command is <code>? dataTable.GetErrors</code></p> <p><img src="https://i.stack.imgur.com/ekNb5.png" alt="enter image description here"></p> <p>This will show you all datarows which have an error. You can get then look at the <code>RowError</code> for each of these, which should tell you the column that's invalid along with the problem. So, to see the error of the first datarow in error the command is:<br> <code>? dataTable.GetErrors(0).RowError</code><br> or in C# it would be <code>? dataTable.GetErrors()[0].RowError</code></p> <p><img src="https://i.stack.imgur.com/Ynmlf.png" alt="enter image description here"></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload