Page 1 of 1

dotconnect for SqlServer

Posted: Mon 07 May 2012 22:55
by llorracj
I attempted to retrieve the DataSource property from an SqlConnection. The value returned was an empty string not the Data Source. Found a workaround. Initialize a ConnectionStringBuilder using the connection's ConnectionString. Retrieving the DataSource property from the ConnectionStringBuilder yields the expected result.

Re: dotconnect for SqlServer

Posted: Fri 11 May 2012 13:48
by Pinturiccio
We could not reproduce the issue. In our environment the DataSource property of SqlConnection class returns a valid value.
Could you please specify the dotConnect for SQL Server version? You can check it by selecting About dotConnect for SQL Server from the SQL Server submenu of the Tools menu in Visual Studio. You will see the dialog box displaying the version and edition of dotConnect for SQL Server.
Also please send us a small test project.

Re: dotconnect for SqlServer

Posted: Fri 11 May 2012 18:09
by llorracj
Thanx for the quick response.

Since you couldn't find the problem I did some further investigation. I am writing a general purpose piece of software and the Connection is defined as a DbConnection rather than an SqlConnection. It is the DbConnection which does not have the DataSource property set.

If you try:

DbConnection cnn = new SqlConnection(connectionString)

I think you will discover that cnn.DataSource yields an empty string. Casting cnn to an SqlConnection yields the expected result.

If you require a small program please let me know.

I am using version 2.50.483.0

Re: dotconnect for SqlServer

Posted: Sat 26 May 2012 11:04
by llorracj
Since I have not received an update - The DbConnection should be updated with the data from the SqlConnection. You should not have to cast to get the correct result.

Re: dotconnect for SqlServer

Posted: Mon 28 May 2012 13:50
by Pinturiccio
We have reproduced the issue and fixed the bug with the override of the DataSource property of the DbConnection class. We will post here when the corresponding build of dotConnect for SQL Server is available for download.

Re: dotconnect for SqlServer

Posted: Fri 08 Jun 2012 13:58
by Pinturiccio
The new build of dotConnect for SQL Server 2.50.510 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/sqlser ... nload.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=24295