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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create a connection string for CVI/SQL Toolkit when connecting to SQL Server 2008

Solved!
Go to solution

Champ11,

 

The post you are responding to was from almost 3 years ago - you might be better off sending TJANK a private message or starting a new thread.

Humphrey H.
Applications Engineer
National Instruments
0 Kudos
Message 11 of 16
(1,435 Views)

Hello sir..... I am new to Labview ....Will u give a basic idea regarding  how to connect SQL databse application through LabView..... ?

0 Kudos
Message 12 of 16
(1,414 Views)

Let me know..how to Connect SQL databse with LabView....?

0 Kudos
Message 13 of 16
(1,414 Views)

You'd better ask in the LabVIEW forum here

0 Kudos
Message 14 of 16
(1,408 Views)

Yes, this is really an old post.. but as I have the same problem,.. by googling.. it ends up at this post..and there is no exact example of solution. Here is my working connection string as for a guide line used on CVI 2017, running MS SQL 2008 R2, with a named instance (DB1)

DBConnect("Driver={SQL Server};Server=127.0.0.1\\DB1;Database=dbname;Uid=sa;Pwd=lalala;");

 

Something like "ODBC;Driver={SQL Server} .." leads me to different path.. which does not work for me. and since I 'm running a named instance, "Server=ip\\instance_name" is mandatory.

 

Roadmap before success: try creating a working User or System DSN in ODBC manager. Turn on ODBC trace log. Use DBConnect in CVI to connect to the DSN successfully. Then compare the trace log with your failed DSN-less DBConnect string.. check/compare the [provider]..[driver].. path

Readjust the connection string...

Message 15 of 16
(723 Views)

Forgot to mention that, the above working connection string require enabling TCP/IP protocol for the named instance too. With different connection string that leads to other provider/driver, it mays also lead to other protocol such as named pipe, which might require you to readjust the 'server=xxxx' part.

0 Kudos
Message 16 of 16
(722 Views)