LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -2147217865 when inserting data LabVIEW Database Connectivity Toolkit windows 11.

I developed an application on LV 2020 32 bit that uses the Database Connectivity Toolkit. 

It was working fine with Windows 10. 

Now with windows 11, it is giving an error when inserting data into the database. 

 

I was able to find the point where the error occurs. This error happens on the LabVIEW library 

 

Anyone has faced this issue ? Any help is appreciated. 

 

I'm not sharing my code since the issue happens on the LabVIEW libraries.

 

 

C:\Program Files (x86)\National Instruments\LabVIEW 2020\vi.lib\addons\database\Recordset.llb\Rec Create - Command.vi
 
LVNinja_0-1752179076042.png

 

0 Kudos
Message 1 of 5
(158 Views)

That error number is one that should only occur when you try to reference a table or view with a name that doesn't exist.  Hint:  If you tried to Google this error and got no results, it's because you can't Google negative numbers since it thinks that means you're excluding that from your results.  If you get a negative error number and need to look it up, remove the minus sign and it'll still return results.

 

Best guess, the source of the error is probably one of two things:

  1. The "upstream" code that feeds a table/view name into the database code that generates this Recordset object is now feeding it a different name under Windows 11, or something else similar upstream has also changed (such as it maybe connecting to a different database missing that table, somehow).
  2. The table/view name hasn't changed, but the Windows 11 implementation of string matching somehow has, and maybe it's now case-sensitive, or needs to have some whitespace removed, or it needs to use a "fully qualified" name now where it didn't before.  So you might need to input "[DBname].[TableName]" where before you just put in "tablename".
0 Kudos
Message 2 of 5
(137 Views)

Thank you for your message. 

 

the error happens on the NI library vi, and also happens when running the example shipped NI Database toolkit. 

 

If i was to try implement option number 2, do you happen to know any reference for this implementation on windows 11 (about the string) ? If that's the case then the NI libraries  will need to be modified. 

 

0 Kudos
Message 3 of 5
(99 Views)

Best guess is that you try running a "list all tables" command that matches your database type:

https://www.sqltutorial.org/sql-list-all-tables/

 

Then make sure you copy the table name back exactly as delivered to you.

0 Kudos
Message 4 of 5
(81 Views)

LVNinja_0-1752271484525.png

When creating the object  ADODB._Recordset.Open - source is wired to ADODB._Command that's when the error happens. 

It worked fine with Windows 10, this is LV 2020 (32Bit), SQL Server Native Clienc 11.0

I wonder if anything got lost with new versions.

 

 

0 Kudos
Message 5 of 5
(74 Views)