Opened 15 years ago
Closed 15 years ago
#567 closed defect (fixed)
SQLServerSpatial: Stale native connection string when connect twice.
Reported by: | brentrobinson | Owned by: | brentrobinson |
---|---|---|---|
Priority: | major | Milestone: | 3.5.0 |
Component: | SQLServer Spatial | Version: | 3.5.0 |
Severity: | 3 | Keywords: | SQLServerSpatial connect connection property dictionary |
Cc: | External ID: |
Description
The following steps:
- create an FDO connection.
- retrieve its connection property dictionary
- set the server, user and datastore properties
- connect (fails as expected since password not set )
- set the password property
- connect
fails on second connect, even though a password was supplied. The following code reproduces the bug:
FdoPtr<IConnectionManager> manager = FdoFeatureAccessManager::GetConnectionManager (); FdoPtr<FdoIConnection> conn = manager->CreateConnection (L"OSGeo.SQLServerSpatial"); FdoPtr<FdoIConnectionInfo> connInfo = conn->GetConnectionInfo(); FdoPtr<FdoIConnectionPropertyDictionary> dict = connInfo->GetConnectionProperties(); dict->SetProperty( L"Service", L"your_server_here" ); dict->SetProperty( L"Username", L"your_user" ); dict->SetProperty( L"DataStore", L"your_database" ); try { conn->Open(); } catch ( ... ) { } dict->SetProperty( L"Password", L"your_user_password" ); conn->Open();
Change History (2)
comment:1 by , 15 years ago
Status: | new → assigned |
---|
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Revision: 5025 Author: brentrobinson Date: 10:26:03 AM, Wednesday, October 14, 2009 Message: Ticket#567: Fixed stale native connection problem. If native connection parm not set, regenerate it each time a connection is opened.
Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Connection/FdoRdbmsConnection.cpp Modified : /trunk/Providers/GenericRdbms/Src/Fdo/Connection/FdoRdbmsConnection.h Modified : /trunk/Providers/GenericRdbms/Src/SQLServerSpatial/Fdo/FdoRdbmsSqlServerConnection.cpp Modified : /trunk/Providers/GenericRdbms/Src/SQLServerSpatial/Fdo/FdoRdbmsSqlServerConnection.h Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.cpp Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Common/FdoConnectTest.h Modified : /trunk/Providers/GenericRdbms/Src/UnitTest/Odbc/OdbcFdoConnectTest.h