CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    1

    ODBC - Try,Catch Question!



    I'm attempting to perform a GetFieldValue from an ODBC Database immediately after doing an Edit-Update on the database.

    However, the code is throwing an exception. When I attempt a Try-Catch-Throw operation, I am recieving an empty error

    code. Any advice would be appreciated! Thanks in advance... below is a snipit of the code:

    ** dis & m_pCarStat are instances of the ODBC Database **

    ---------------------------------------------------------

    m_EDITBOX1.GetWindowText(EditString);

    dis->Edit( );

    dis->m_AISLE = EditString;

    dis->Update( );

    dis->MoveFirst( );

    m_pCarStat->MoveFirst();

    if (m_pCarStat->IsFieldDirty(&"AISLE&quot)

    {

    try

    {

    m_pCarStat->GetFieldValue( "AISLE", m_FETCHVAR);

    }

    catch (CDBException* e)

    {

    AfxMessageBox( e->m_strError, MB_ICONEXCLAMATION );

    e->Delete();

    throw;

    }

    }

  2. #2
    Join Date
    Oct 1999
    Location
    California, USA
    Posts
    52

    Re: ODBC - Try,Catch Question!

    Try checking CDBException::m_strStateNativeOrigin



Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured