From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i connect to a remote SQL database

hi,

     How do i connect to a remote SQL database using labview,ODBC and the db connectivity toolset.

0 Kudos
Message 1 of 8
(3,735 Views)

1. Set up ODBC to the correct address and make sure Test connection works.

2. Use the configured ODBC name with Open Database.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 8
(3,710 Views)

UDL is best option.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 8
(3,701 Views)

There are step by step instructions right in the manual (below).  Basically you can set up an ODBC connection on your PC and use its name when you open a connection OR you can send a full connection string right to the DB Tools Open Connection VI.  Either way you'll probably need permissions set up by whoever is administering the server (assuming the database is secured).

 

http://sine.ni.com/psp/app/doc/p/id/psp-360/lang/en

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 4 of 8
(3,693 Views)

@Ranjeet_Singh wrote:

UDL is best option.


I agree, UDL is better, but that was not the question. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 8
(3,683 Views)

@Yamaeda wrote:

@Ranjeet_Singh wrote:

UDL is best option.


I agree, UDL is better, but that was not the question. 😉

/Y


why not? For connecting to remote database, we can use the UDL

 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 8
(3,651 Views)

yes i tried UDL it work .but i may about how to connect through  ODBC.

0 Kudos
Message 7 of 8
(3,640 Views)

Yes there are other ways but advantage is whenever required, we can change the connection string. Hence we dont need to hardcode it

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 8 of 8
(3,619 Views)