Logo Search packages:      
Sourcecode: maxdb-7.5.00 version File versions  Download package

bool DBMSrvKnl_Session::NormalConnect ( const char *  szDB,
const char *  szUser,
const char *  szPassword 
)

connect to user task

public member

Definition at line 69 of file DBMSrvKnl_Session.cpp.

References SAPDBErr_MessageList::AppendNewMessage().

Referenced by cn85_KernelConnect().

{
  this->oMessageList.ClearMessageList();

  // check user and password
  if ((szUserIn == NULL) || (szPassword == NULL) || (strlen(szUserIn) == 0) || (strlen(szPassword) == 0)) {
    SAPDBErr_MessageList oDBM(DBMSrv_DBMError(PARAM), 0);
    SAPDBErr_MessageList oMsg(DBMSRV_ERR_MISSDBUSRPWD);
    oDBM.AppendNewMessage(oMsg);
    this->oMessageList = oMsg;
    return false;
  } // end if

  if (this->Connect(DBMSrvKnl_Session::taskNormal, szDB )) {
    if(!this->ConnectUser(szUserIn, szPassword)) {
      this->Release();
    } else {
      this->bConnected = true;
    } // end if
  } // end if

  return this->oMessageList.IsEmpty();
} // end DBMSrvKnl_Session :: NormalConnect


Generated by  Doxygen 1.6.0   Back to index