Form2:中的语句:
Fmain.ADOTable1.Close;
fmain.ADOTable1.TableName:='c2';
dbimage1.DataField :='aaa';
fmain.ADOTable1.Open;
Fmain.ADOTable1.Close;
fmain.ADOTable1.TableName:='c2';
dbimage1.DataField :='aaa';
fmain.ADOTable1.Open;
调试欢乐多
如果数据库有变化 只要改变一下 adoconnection.defaultdatabase为你需要指定的数据库绝对位置就行了 当然 connected要关了先
fmain.ADOConnection1.connected:=false;
fmain.ADOConnection1.connected:=true;
fmain.ADOTable1.TableName:='c2';
fmain.ADOTable1.Active :=true;
dbimage1.DataField :='aaa'