D
Delphi刘
Unregistered / Unconfirmed
GUEST, unregistred user!
我编的一段动态创建数据表的程序
var
TblNew:TTable;
IndexOptions:TIndexOptinos;
TableFound:Boolean;
Begin
TblNew:=Table.Create;
IndexOptions:=[ixPrimary,ixUnique];
with TblNew do
begin
Active:=True;
DataBaseName:='NyJyData';
TableName:=Edit1.Text;
TableType:=ttDefault;
FieldDefs.clear;
FieldDefs.add(Edit2.Text,ftInteger,0,False);
FieldDefs.add(Edit3.Text,FtString,0,False);
end;
TableFound:=FindTable(Edit1.Text);
if TableFound=True then
if MessageDlg(Edit1.Text+'already Exist,Overwrite?',mtConfirmation,
mbYesNo,0)=mrYes then
TableFound:=False;
end;
else
CreateTable;
end;
为什么编译通不过呢?
提示错误:
Undeclared indentifier:TTable;
Undeclared indentifier:TIndexOption;
var
TblNew:TTable;
IndexOptions:TIndexOptinos;
TableFound:Boolean;
Begin
TblNew:=Table.Create;
IndexOptions:=[ixPrimary,ixUnique];
with TblNew do
begin
Active:=True;
DataBaseName:='NyJyData';
TableName:=Edit1.Text;
TableType:=ttDefault;
FieldDefs.clear;
FieldDefs.add(Edit2.Text,ftInteger,0,False);
FieldDefs.add(Edit3.Text,FtString,0,False);
end;
TableFound:=FindTable(Edit1.Text);
if TableFound=True then
if MessageDlg(Edit1.Text+'already Exist,Overwrite?',mtConfirmation,
mbYesNo,0)=mrYes then
TableFound:=False;
end;
else
CreateTable;
end;
为什么编译通不过呢?
提示错误:
Undeclared indentifier:TTable;
Undeclared indentifier:TIndexOption;