LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect to Azure SQL Cloud DB with CData ODBC Driver

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.

0 Kudos
Message 1 of 5
(1,986 Views)

The error message mentions "TEST." as table name while you talk about a "TEST" table. Could that be it?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 5
(1,957 Views)

Hi, thanks for your answer. 

I am a new LabVIEW user so here is the picture of that part in the project:

SaaraV_0-1619592881124.png

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. 

0 Kudos
Message 3 of 5
(1,922 Views)

Hi,

solved the problem!

I was trying to call Azure database table but this ODBC will only work with storage account tables.

0 Kudos
Message 4 of 5
(1,901 Views)

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. 

SaaraV_0-1619778952789.png

Any idea how I could get this work?

 

Thanks,

Saara

0 Kudos
Message 5 of 5
(1,927 Views)