Cloning FbConnection without connection string throws exception
---------------------------------------------------------------
Key: DNET-141
URL: http://tracker.firebirdsql.org/browse/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]
OR
* 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:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
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.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider