MFC -> CDBException

Discussion in 'C++' started by Diogo Moreno, Sep 9, 2003.

  1. Diogo Moreno

    Diogo Moreno Guest

    hi there...
    When try to delete a record, CRecordset throws a
    AFX_SQL_ERROR_NO_CURRENT_RECORD exception... Anybody knows what it
    means? My sql query is right...

    Ex.:
    CRecordset m_reg;
    m_reg.m_strFilter = "ID_NET=0 AND ID_CASE=107 AND NAME='gr' AND
    PT_PTO='Line AC 1 3 1'";
    m_reg.Delete(); //exception

    TIA!
     
    Diogo Moreno, Sep 9, 2003
    #1
    1. Advertisements

  2. Diogo Moreno

    Howard Guest

    "Diogo Moreno" <> wrote in message
    news:...
    > hi there...
    > When try to delete a record, CRecordset throws a
    > AFX_SQL_ERROR_NO_CURRENT_RECORD exception... Anybody knows what it
    > means? My sql query is right...
    >
    > Ex.:
    > CRecordset m_reg;
    > m_reg.m_strFilter = "ID_NET=0 AND ID_CASE=107 AND NAME='gr' AND
    > PT_PTO='Line AC 1 3 1'";
    > m_reg.Delete(); //exception
    >
    > TIA!


    Looks like it means that there are no records when that filter is applied.
    You may have to put that Delete in a try..except block to catch exceptions
    like this. But you'd better ask this in a microsoft newsgroup, preferable
    one dealing with sql. It's pretty far off-topic here.
    -Howard
     
    Howard, Sep 9, 2003
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ss

    mslu for VC7 with static MFC

    ss, Jul 29, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    1,125
  2. Tarundeep Singh Kalra

    VC++ MFC and .NET

    Tarundeep Singh Kalra, Jan 19, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,800
    Gaurav Khanna [C#/.NET MVP]
    Jan 23, 2004
  3. Max-Ph. Blickenstorfer
    Replies:
    2
    Views:
    2,492
    Max-Ph. Blickenstorfer
    Jan 29, 2004
  4. ***C.Steamer***
    Replies:
    8
    Views:
    510
    jacob
    Oct 28, 2004
  5. Jonathan Belson
    Replies:
    3
    Views:
    811
    Thomas Fritsch
    Apr 19, 2005
  6. Tim Ward

    Java <-> MFC?

    Tim Ward, Apr 25, 2005, in forum: Java
    Replies:
    12
    Views:
    5,942
    Tim Ward
    Apr 26, 2005
  7. ringos75
    Replies:
    0
    Views:
    1,201
    ringos75
    Apr 14, 2005
  8. yopwojtek

    Derive from MFC DLL to MFC APP

    yopwojtek, Aug 6, 2005, in forum: C++
    Replies:
    1
    Views:
    573
    Alf P. Steinbach
    Aug 6, 2005
Loading...