LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout property ignored in DB Tools Open Connection.VI

Very simple issue:

 

I am using the NI LabVIEW Database Connectivity Toolkit to connect to a remote SQL Server 2008 R2 database server.

 

Here is my connection string:

 

Provider=SQLNCLI10.1;Data Source=my_ip_address,my_port;Network Library=DBMSSOCN;Initial Catalog=my_database;User ID=my_username;Password=my_password;Connect Timeout=5;

 

It works fine.  Expect for the timeout property.  Note how I have specified a timeout of 5 sec in the connection string.  And I also specify a timeout of 5 sec when I call the Open Connection VI as seen below:

 

Capture.JPG

 

 

But the connection timeout is always around 20 seconds.  No matter what I do.  My timeouts are just ignored.

 

Any tips?

http://www.medicollector.com
0 Kudos
Message 1 of 3
(2,886 Views)

Any possibility that the connection is already open?

 

From the ADO reference:  The ConnectionTimeout property is read/write when the connection is closed and read-only when it is open

 

Are you sure this is supported by SQL Server 2008 ? Again, from ADO:  Make sure the provider to which you are writing code supports the ConnectionTimeout functionality.

 

 

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 3
(2,873 Views)

Thanks.  You are probably right about the provider. 

http://www.medicollector.com
0 Kudos
Message 3 of 3
(2,863 Views)