Error -2147217913 from the LabVIEW Database Connectivity Toolkit

Updated Apr 26, 2023

Reported In


  • LabVIEW
  • LabVIEW Database Connectivity Toolkit

Issue Details

  • I am receiving Error -2147217913 from the LabVIEW Database Connectivity Toolkit intermittently when I try writing to my database. My database is an SQL server. This error means that there is a data type mismatch, but all of my data types are correct. This error is not consistent and seems to occur randomly in an application that runs over a period of days.  Why do I receive this error?
  • My data is not compatible with the data types accepted by the LabVIEW Database Connectivity Toolkit.


To resolve this error we need to check to aspects:
  • The variable is among the datatypes accepted by the LabVIEW Database Connectivity Toolkit as mentioned in the help . If LabVIEW tries to read data of a datatype not supported from a SQL database, it can present an unexpected behavior and an this error.
  • Your data may be of the correct type, but the problem may be occurring if your data goes out of the valid range. For example, if your date field goes out of range, it returns -/-/- instead of valid values. Your database might have criteria set that only valid dates are acceptable. This might also happen if other values, like numerics, go out of range. In order to avoid this, you must check for out-of-range values in your program before you write them to the database. If a value is not valid, you can assign some default value to write for these out-of-range cases. This helps to preserve database integrity as well.