[FB-Tracker] Created: (DNET-281) FbConnectionStringBuilder default values behavior

View: New views
1 Messages — Rating Filter:   Alert me  

[FB-Tracker] Created: (DNET-281) FbConnectionStringBuilder default values behavior

by JIRA tracker@firebirdsql.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

FbConnectionStringBuilder default values behavior
-------------------------------------------------

                 Key: DNET-281
                 URL: http://tracker.firebirdsql.org/browse/DNET-281
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
    Affects Versions: 2.5.1
         Environment: Windows
            Reporter: Vasily Kabanov
            Assignee: Jiri Cincura
            Priority: Minor


1) None of the properties in the connection string builder appears to have default values: if you create new instance with parameterless constructor and try to get any property value you get an ArgumentException because all the properties directly query the base class for hard-coded key value. This is very different from other builders (such as SqlConnectionStringBuilder) and causes problems such as when you try to create database connection dialog for the user. All these defaults need to be implemented manually anyway in a wrapper.

fb.FbConnectionStringBuilder fbld = new fb.FbConnectionStringBuilder();
string userID = fbld.UserID; // throws exception

System.Data.SqlClient.SqlConnectionStringBuilder bld = new System.Data.SqlClient.SqlConnectionStringBuilder();
userID = bld.UserID; // returns empty string


2) If you set a property and then want to revert to default (delete key-value pair) there's no graceful way (for example, for integer properties) as key names are hard-coded as literals and not exposed (as public constants, for example). Also, after creating empty conn.string builder its Keys collection is empty which is again different from other implementations.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@...
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider