Cloning FbConnection without connection string throws exception

                 Key: DNET-141
             Project: .NET Data provider
          Issue Type: Bug
          Components: ADO.NET Provider
            Reporter: Jiri Cincura
            Assignee: Jiri Cincura

If you tryt o run this code

FbConnection fbConnection = new FbConnection(); 
FbConnection fbConnection1 = (FbConnection)((ICloneable)fbConnection).Clone();

it will throw exception.

It's because if we create FbConnection without connection string in ctor, we're 
internally assigning empty string. But when cloning the connection, we put 
property to ctor and then this is validated and fails. I suppose:
* to test in Clone method whether connection string is empty (or null) and if 
so create FbConnection with null in ctor param [this is least painful solution]
* not to assing internally empty string but leave it null (if no connection 
string has been provided) [this is maybe a little bit clear solution, but needs 
to review code on various place, whether something doesn't depends on empty 
connection string]

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
Firebird-net-provider mailing list

Reply via email to