LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL Server connection strings

Solved!
Go to solution

Hello, I currently use access to create a database, in the file that I use I use a connection string, it works very well, I do not use .UDL. now I want to use SQL server or Mysql metiante the same method I need help. Thank you.

0 Kudos
Message 1 of 10
(6,865 Views)

The connection strings for MySQL and MS SQL are all pretty much the same. Just change the relevant fields to the values matching your database and you should be good to go.

 

Here is an example of a DSN for MySQL.

[ODBC]
DRIVER=MySQL ODBC 5.1 Driver
UID=user
SERVER=1.2.3.4
PORT=0
OPTION=0
PWD=password



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 10
(6,836 Views)

Hello Mark Yedinak I hope you excuse my little experience. Now I have installed the 2014 SQL server 32bit. and MySQL Community Server 8.0.13 x64 I could not make a connection. I managed to do it using .UDL I have w10 64; labview 16 32bit. Can you give me an example with more details please, I have been with this problem for weeks. thank you.


@Mark_Yedinak  ha escrito:

The connection strings for MySQL and MS SQL are all pretty much the same. Just change the relevant fields to the values matching your database and you should be good to go.

 

Here is an example of a DSN for MySQL.

[ODBC]
DRIVER=MySQL ODBC 5.1 Driver
UID=user
SERVER=1.2.3.4
PORT=0
OPTION=0
PWD=password


 

0 Kudos
Message 3 of 10
(6,828 Views)

hi i'm using 2008 version and this connection string works for me.

[SQLDB]
DataBase=database name
Server=server name
Username=username
Password=yourpassword

replace the fields with your table and server info.

 

if you are using windows authentication the following connection string should work. 

 

Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;InitialCatalog=FIMCertificateManagement;Data Source=your server name;database=database name;

 

the connections string can by obtained from udl file, just open it in a text file.

bp
0 Kudos
Message 4 of 10
(6,815 Views)

The UDL is a helpful tool even if you don't want to use them. Create an empty .UDL, open it and configure it to work with your SQL server, then open it in a text editor and copy the Connection string. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 10
(6,804 Views)
Solution
Accepted by topic author Victorfasanando
Message 6 of 10
(6,802 Views)
 

thanks for your reply. get the communication with this string

 

 Driver={SQL Server Native Client 11.0};Uid=sa;Pwd=serincop20514005932;Server=DESKTOP-08H2FR3\SERINCOPDB;Database=datosvictor;

I use the sql server 2014.

 

when I want to install my project (.exe) in Labview. to another pc. Is it necessary to install all the sql server packages or is there a runtime? as access runtime

.

 

 

0 Kudos
Message 7 of 10
(6,781 Views)

You may need to install the DB driver, but that should be the only thing you need to install. Obviously you will need the DSN so that you can connect.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 8 of 10
(6,773 Views)

@Victorfasanando wrote:

when I want to install my project (.exe) in Labview. to another pc. Is it necessary to install all the sql server packages or is there a runtime? as access runtime


As Mark said, I think a driver should be enough.

 

But there's also a compact edition. I think Citadel (LV DSC) installs that too.

 

The driver allows communication to SQL databases, the SQL Server compact version allows running a database locally.

 

I'm not an expert on this, but I know there's a free SQL Server Database client. It looks like it's the compact version, but I might be wrong.

 

You might also like Sql Server Management Studio, to manage the free client.

0 Kudos
Message 9 of 10
(6,763 Views)

thank you for your answers I will study your recommendations

0 Kudos
Message 10 of 10
(6,721 Views)