Y
yyy_123
Unregistered / Unconfirmed
GUEST, unregistred user!
我想清空Access表的全部记录,用ADO连接,可是用下面的语句,在Access
中表里已没有记录了,可是程序中连接的DBGride仍然显示原来的记录,请大家帮帮我。怎样
是DBGride也显示也无记录。对了,我是学BCB的,但同Delphi 差不多。
ADOTable->Open();
if(!ADOTable->IsEmpty())
{
ADOQuery->Close();
ADOQuery->SQL->Clear();
ADOQuery->SQL->Add("DELETE FROM "+ ADOTable->TableName);
ADOQuery->ExecSQL();
ADOTable->Close();
ADOTable->Open();
}
中表里已没有记录了,可是程序中连接的DBGride仍然显示原来的记录,请大家帮帮我。怎样
是DBGride也显示也无记录。对了,我是学BCB的,但同Delphi 差不多。
ADOTable->Open();
if(!ADOTable->IsEmpty())
{
ADOQuery->Close();
ADOQuery->SQL->Clear();
ADOQuery->SQL->Add("DELETE FROM "+ ADOTable->TableName);
ADOQuery->ExecSQL();
ADOTable->Close();
ADOTable->Open();
}