[fdo-trac] #567: SQLServerSpatial: Stale native connection string when connect twice.

FDO trac_fdo at osgeo.org
Wed Oct 14 10:23:07 EDT 2009


#567: SQLServerSpatial: Stale native connection string when connect twice.
---------------------------------+------------------------------------------
   Reporter:  brentrobinson      |       Owner:  brentrobinson                                          
       Type:  defect             |      Status:  new                                                    
   Priority:  major              |   Milestone:  3.5.0                                                  
  Component:  SQLServer Spatial  |     Version:  3.5.0                                                  
   Severity:  3                  |    Keywords:  SQLServerSpatial connect connection property dictionary
External_id:                     |  
---------------------------------+------------------------------------------
 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();
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/fdo/ticket/567>
FDO <http://fdo.osgeo.org/>
Feature Data Objects


More information about the fdo-trac mailing list