D
ddt
Unregistered / Unconfirmed
GUEST, unregistred user!
这段程序按我的要求建立了e:/abcde.dbf,但用VFP打开该数据库却得到Enable Table,为什么呢?
该如何动态生成下确的数据库
void __fastcall TForm1::Button8Click(TObject *Sender)
{
TTable *TableOutput;
TableOutput= new TTable(NULL);
//TableOutput->DatabaseName =ExtractFileDir(DBFOutput);
TableOutput->TableName ="e://abcde.dbf";
//add fields
TableOutput->FieldDefs->Add("aaa",ftString,0,true);
TableOutput->FieldDefs->Add("bbb",ftString,0,true);
TableOutput->FieldDefs->Add("ccc",ftString,0,true);
TableOutput->FieldDefs->Add("ddd",ftString,0,true);
TableOutput->FieldDefs->Add("eee",ftString,0,true);
TableOutput->FieldDefs->Add("fff",ftString,0,true);
TableOutput->CreateTable ();
TableOutput->Active =true;
TableOutput->AppendRecord (ARRAYOFCONST(("hhh","Crob","Crob","Crob","Crob","end")));
TableOutput->Edit();
TableOutput->Post ();
}
该如何动态生成下确的数据库
void __fastcall TForm1::Button8Click(TObject *Sender)
{
TTable *TableOutput;
TableOutput= new TTable(NULL);
//TableOutput->DatabaseName =ExtractFileDir(DBFOutput);
TableOutput->TableName ="e://abcde.dbf";
//add fields
TableOutput->FieldDefs->Add("aaa",ftString,0,true);
TableOutput->FieldDefs->Add("bbb",ftString,0,true);
TableOutput->FieldDefs->Add("ccc",ftString,0,true);
TableOutput->FieldDefs->Add("ddd",ftString,0,true);
TableOutput->FieldDefs->Add("eee",ftString,0,true);
TableOutput->FieldDefs->Add("fff",ftString,0,true);
TableOutput->CreateTable ();
TableOutput->Active =true;
TableOutput->AppendRecord (ARRAYOFCONST(("hhh","Crob","Crob","Crob","Crob","end")));
TableOutput->Edit();
TableOutput->Post ();
}