|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ConnectionTimeout is always 15 coming back from the DataLinksClass dialogI have an application where we use the OleDb DataLinkClass dialog to
retrieve the connection string. In the advanced tab one can set the connection time. I set it to any value but the dialog always returns the default 15. I am connecting to SqlServer using the MS OleDB Component Service Provider. Is this a bug or limitation? Or does it indicate that the connection time is not supported by provider. Although I noticed in the threads that one can set connection time directly in the connection string which indicates that it is supported. Thanks Hi,
I would suggest to set timeout in a connection string directly. In this case you will avoid any issues. It is supported with OLEDB for SQL Server Show quoteHide quote news:1112740432.648639.141640@o13g2000cwo.googlegroups.com... > > I have an application where we use the OleDb DataLinkClass dialog to > retrieve the connection string. In the advanced tab one can set the > connection time. I set it to any value but the dialog always returns > the default 15. > > I am connecting to SqlServer using the MS OleDB Component Service > Provider. > > Is this a bug or limitation? Or does it indicate that the connection > time is not supported by provider. Although I noticed in the threads > that one can set connection time directly in the connection string > which indicates that it is supported. > > Thanks > Thanks Val for the suggestion.
The thing is my application calls for gathering of the connection string parameters through the Data Link Properties dialog. This dialog does not allow a user to enter the connection string directly. It has a Connect Timeout field in the Advanced tab. Andany value the user enters seems to be ignored and the dialog passes back the default Connection Time to my application. My question is how do I make this dialog behave correctly or is it not possible, i.e., a Microsoft bug without any circumvention. Thanks, Nick How to reproduce it? If it is a bug, then you would need to build connection
string dynamically. I would prefer this way anyway. Show quoteHide quote "nuychaco" <nuych***@gmail.com> wrote in message news:1112811141.437112.326490@l41g2000cwc.googlegroups.com... > > Thanks Val for the suggestion. > > The thing is my application calls for gathering of the connection > string parameters through the Data Link Properties dialog. This dialog > does not allow a user to enter the connection string directly. It has a > Connect Timeout field in the Advanced tab. Andany value the user enters > seems to be ignored and the dialog passes back the default Connection > Time to my application. > > My question is how do I make this dialog behave correctly or is it not > possible, i.e., a Microsoft bug without any circumvention. > > Thanks, > Nick > Hi Val,
Quite easy to reproduce ... see code snippet below private void button1_Click(object sender, System.EventArgs e) { string retVal = string.Empty; ADODB.Connection connection = null; MSDASC.DataLinks links = new MSDASC.DataLinksClass(); System.Object connectionObject = links.PromptNew(); // dialog pops, enter time = 77 connection = (ADODB.Connection)connectionObject; retVal = connection.ConnectionString; int timeOut = connection.ConnectionTimeout; // this value is always 15 } The point is the Data Links dialog shows Connect Time in one of its tab and the customer naturally expects that they can enter and modify it and that our application will take the value from there. Thanks, Nick
Other interesting topics
SQL Server does not exist
Join two datatables populated from different sources? memory leak in SqlDataAdapter.Fill method? ADO.Net Connection Pooling Problem with Oracle DataView.RowFilter issue Cannot Open Any More Tables Formatting a SQL query Editing Info in a DataTable shared access folder problem Sending XML From .Net To SQLServer |
|||||||||||||||||||||||