Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TADOTable Delete Help

Status
Not open for further replies.

BorlandGeek

Programmer
Jun 14, 2004
27
0
0
CA
I want to delete all my records in a table
so i do this

Table1->Delete(); //preparing for delete
Table1->DeleteRecords(arAll);

the last line causes an error saying cannot to this
in this context anyone have any ideas??
 
From what I remember, Table1->Delete() does not prepare the table, it deletes the current record. I think before you call Table1->DeleteRecords(arAll) you should use Table1->Active;

James P. Cottingham
[sup]
There's no place like 127.0.0.1.
There's no place like 127.0.0.1.
[/sup]
 
The exect error says
"Operation is not allowed in this context"
calling active didnt work.... Im thought it might not be
able to delete, so i called
TCursorOptions Option;

bool del = false;
TCursorOptions Option;
Option.operator >>(coDelete);
del = Table1->Support(Option);
ShowMessage(BoolToStr(del));

and the bool is true... im lost cause the table still wont
let me delete...
 
Sorry lastcybord DeleteTable is not a member of TADOTable
anyone else got any ideas
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top