04-27-2021 07:49 AM
Hi,
Is it possible to connect LabVIEW with Azure SQL Data Base on cloud? I have downloaded CData ODBC Driver and created a System DSN. I can query the data via ODBC fromSQL Srver Management Studio.
However, if I try to create Data Link through LabVIEW and use the created .udl file as connection information, I get the following error:
Error -2147467259 occurred at NI_Database_API.lvlib:Conn Execute.vi->NI_Database_API.lvlib:DB Tools Select Data.vi->Untitled 9
Possible reason(s):
ADO Error: 0x80004005
Exception occured in Microsoft OLE DB Provider for ODBC Drivers: A table could not be found that matches TEST. in NI_Database_API.lvlib:Conn Execute.vi->NI_Database_API.lvlib:DB Tools Select Data.vi->Untitled 9
I do have a Table named "TEST" in Azure cloud with some test data in it and I would like to access that via LabVIEW.
04-27-2021 09:43 AM
The error message mentions "TEST." as table name while you talk about a "TEST" table. Could that be it?
04-28-2021 01:57 AM
Hi, thanks for your answer.
I am a new LabVIEW user so here is the picture of that part in the project:
Is that the correct way to refer to the table name?
There shouldn't be a dot after the table name in my project even though the error has it.
04-29-2021 12:35 AM
Hi,
solved the problem!
I was trying to call Azure database table but this ODBC will only work with storage account tables.
04-30-2021 05:37 AM
Hi,
I am trying to insert data to Azure cloud storage account table with Database connectivity toolkit.
Reading data from a table named "TEST" works fine, but when I try to insert data, the following error occurs:
Error -2147467259 occurred at NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlib:DB Tools Insert Data.vi->Insert_data.vi
Possible reason(s):
ADO Error: 0x80004005
Exception occured in Microsoft OLE DB Provider for ODBC Drivers: Both a PartitionKey and RowKey must be set to delete a new record into the table. in NI_Database_API.lvlib:Rec Create - Command.vi->NI_Database_API.lvlib:Cmd Execute.vi->NI_Database_API.lvlib:DB Tools Insert Data.vi->Insert_data.vi
I have tried to set a unique PartitionKey and RowNumber but something still is not right.
Here is the picture of that block diagram.
Any idea how I could get this work?
Thanks,
Saara