Error -2147467261 When Querying SQL Database

Updated Sep 9, 2020

Reported In

Software

  • LabVIEW Desktop Execution Trace Toolkit

Other

SQL

Issue Details

When I try to select data from SQL Database using LabVIEW I get the following error in LabVIEW Desktop Execution Trace Toolkit:

Error -2147467261 (LabVIEW:  (Hex 0x80004003) Invalid pointer.
NI System Configuration: A required pointer parameter was NULL.

Solution

This error appears when 1 or more columns in the SQL dataset contain NULL values. To avoid this error, the NULL values should either be removed from the dataset or replaced with default values when selecting them in value, such as below for numeric values:
SELECT ISNULL(myColumn, 0 ) as myColumn FROM myTable