stoping on message box in CRecordset

i create MFC Dialog box project named A

i create a new class

i filled this options
MFC CLASS
BASE CLAS IS CRecordset
class name CADta

DataSource : ODBC DSN is C
RECORD TYPE: snapshot
ADVANCE: Bind all column is check

SELECT DATABASE TABLE: C

i put a button on Dialog box this is the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
void CADlg::OnButton1() 
{
	// TODO: Add your control notification handler code here

CADta OA; // this is the new class that i create that is connected to 
	//DSN "C" 

OA.Open();

OA.Requery();
 
while(OA.IsEOF())
{ 

	OA.Delete()
    OA.MoveNext();
	
}


OA.close();	
}



my problem is when i delete all, it doesn't delete all the records in the fields, It sends a messagebox that says multiple rows been deleted. the database contained 3 desame name in a 3 row. ex:

rowcount field1 field2 etc..
1 ador
2 kasmiro
3 kasmiro
4 kasmiro
5 nelson

it delete's ador, Kasmiro but it left's nelson on the databaseTable.
i want to delete all in the databasename,

please help me.
Kasmiro
1
2
3
method delete - Deletes the current record from the recordset. You must explicitly scroll to another record after the deletion.

If you want to delete all the rows, you should delete them one by one.

Topic archived. No new replies allowed.