dotconnect for SqlServer

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Microsoft SQL Server
Post Reply
llorracj
Posts: 4
Joined: Mon 07 May 2012 22:18

dotconnect for SqlServer

Post by llorracj » Mon 07 May 2012 22:55

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotconnect for SqlServer

Post by Pinturiccio » Fri 11 May 2012 13:48

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.

llorracj
Posts: 4
Joined: Mon 07 May 2012 22:18

Re: dotconnect for SqlServer

Post by llorracj » Fri 11 May 2012 18:09

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

llorracj
Posts: 4
Joined: Mon 07 May 2012 22:18

Re: dotconnect for SqlServer

Post by llorracj » Sat 26 May 2012 11:04

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotconnect for SqlServer

Post by Pinturiccio » Mon 28 May 2012 13:50

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.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: dotconnect for SqlServer

Post by Pinturiccio » Fri 08 Jun 2012 13:58

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

Post Reply