MFC -> CDBException

D

Diogo Moreno

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!
 
H

Howard

Diogo Moreno said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top