dotconnect for SqlServer
dotconnect for SqlServer
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.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: dotconnect for SqlServer
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.
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
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
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
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.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: dotconnect for SqlServer
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.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: dotconnect for SqlServer
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
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