07-27-2011 07:58 AM
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:
But the connection timeout is always around 20 seconds. No matter what I do. My timeouts are just ignored.
Any tips?
07-27-2011 09:00 AM - edited 07-27-2011 09:00 AM
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.
07-27-2011 07:48 PM
Thanks. You are probably right about the provider.