Oracle Database programming in VC++ using ADO
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Oracle Database programming in VC++ using ADO

  1. #1
    Join Date
    Jun 2003
    Location
    Bangalore,INDIA
    Posts
    122

    Oracle Database programming in VC++ using ADO

    I am able to connect to oracle database and insert the records into the table using ADO.But i am not able to retrieve integer values from the oracle database.It is retrieving zero.
    Can some body help me.

  2. #2
    Join Date
    Aug 2000
    Location
    New Jersey
    Posts
    968
    Post your code.

    Post the class declartion, and the code you're using to retrieve the number.
    David Maisonave
    Author of Policy Based Synchronized Smart Pointer
    http://axter.com/smartptr


    Top ten member of C++ Expert Exchange.
    C++ Topic Area

  3. #3
    Join Date
    Jun 2003
    Location
    Bangalore,INDIA
    Posts
    122
    while(!dbase.m_pRecordset->adoEOF)
    {
    FieldPtr pfIDNO,pfldLastName;
    _variant_t vIDNO,vLastName;
    int nIDNO;
    char c_szLastName[30];

    //pfIDNO = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_LASTNAME");
    //vIDNO = pfIDNO->Value;
    //nIDNO = vIDNO.iVal;
    /* pfIDNO = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID");

    vIDNO = pfIDNO->Value;
    nIDNO = vIDNO.iVal;
    // WideCharToMultiByte(CP_ACP, 0, vLastName.bstrVal, -1,
    // c_szLastName, sizeof(c_szLastName), NULL, NULL);*/

    //TheValue = dbase.m_pRecordset->GetCollect("EMP_ID");

    _bstr_t a = dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID")->GetValue().lVal;

    /* long l;
    l=dbase.m_pRecordset->Fields->GetItem((_variant_t)"EMP_ID");
    strcpy(tmp,(char *)_bstr_t(TheValue) );
    m_cmbEmpID.AddString(tmp);*/

    dbase.m_pRecordset->MoveNext();

    /*TheValue=dbase.m_pRecordset->GetCollect((_variant_t)"EMP_ID");
    strcpy(tmp,(char *)_bstr_t(TheValue) );
    m_sLastName=tmp;
    dbase.m_pRecordset->MoveNext();*/

    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center