View Single Post

   
  #1 (permalink)  
Old 02-29-2008, 08:30 AM
liorh
 
Posts: n/a
Default ADODB connection with SQL2000SP3

my code is using ADODB connection to connect to SQL (Virtual) Server.

the way it being done is (c++):

ADODB::_ConnectionPtr m_dbConn;
ADODB::_RecordsetPtr m_dbRst;
m_dbConn.CreateInstance(__uuidof(ADODB::Connection ));
m_dbRst.CreateInstance( __uuidof( ADODB::Recordset ));
m_dbConn->ConnectionString=( L"DSN=mydsn" );
m_dbConn->Open("","sa","",-1);

lately after installing SP3 over SQL2000, it was impossible to connect
- the error message showed: login failed for user 'null)'. reason: not
associated with a trusted sql server connection.

so i changed the connection string to:
m_dbConn-> ConnectionString =(L"DSN=mydsn; UID=sa; PWD=;");
m_dbConn->Open("","","",-1);

and now it works !!

what is the reason for that ?
what in sql SP3 interrupt for this kind of connection ?
what is the difference ?

Reply With Quote