D
delphiboy
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.Button1Click(Sender: TObject);
begin
createtable('c:/','ttjbiao1',ttdefault);
with table1 do
begin
active:=false;
databasename:='dedemos';
tablename:='ttjbiao1.db';
tabletype:=ttdefault;
end;
datasource1.DataSet :=table1;
dbgrid1.DataSource :=datasource1;
table1.active:=true;
end;
procedure TForm1.createtable(dbname, tblname: string; tbltype: ttabletype);
begin
tbl:=ttable.Create(self);
with tbl do
begin
active:=false;
databasename:=dbname;
tablename:=tblname;
tabletype:=tbltype;
with fielddefs do
begin
clear;
add('worknum',ftstring,10,true);
add('workname',ftstring,10,true);
add('ac',ftstring,3,false);
add('am',ftstring,3,false);
add('ljm',ftstring,3,true);
add('ljc',ftstring,3,true);
end;
CreateTable;
end;
//提示为‘an error occurred while attempting to initialize the bde’
帮我改改 :)
begin
createtable('c:/','ttjbiao1',ttdefault);
with table1 do
begin
active:=false;
databasename:='dedemos';
tablename:='ttjbiao1.db';
tabletype:=ttdefault;
end;
datasource1.DataSet :=table1;
dbgrid1.DataSource :=datasource1;
table1.active:=true;
end;
procedure TForm1.createtable(dbname, tblname: string; tbltype: ttabletype);
begin
tbl:=ttable.Create(self);
with tbl do
begin
active:=false;
databasename:=dbname;
tablename:=tblname;
tabletype:=tbltype;
with fielddefs do
begin
clear;
add('worknum',ftstring,10,true);
add('workname',ftstring,10,true);
add('ac',ftstring,3,false);
add('am',ftstring,3,false);
add('ljm',ftstring,3,true);
add('ljc',ftstring,3,true);
end;
CreateTable;
end;
//提示为‘an error occurred while attempting to initialize the bde’
帮我改改 :)