var co:tadoconnection; begin //取得当前的表名 if connectstring.Text='' then exit; co:=tadoconnection.Create(self); co.LoginPrompt:=false; co.ConnectionString :=connectstring.Text; co.Open; co.GetTableNames(tablelist.Items); co.Close; co.free; end;
var co:tadoconnection; tablelist:tstringlist; begin //取得当前的表名 tableblist:=Tstringlist.create; if connectstring.Text='' then exit; co:=tadoconnection.Create(self); co.LoginPrompt:=false; co.ConnectionString :=connectstring.Text; co.Open; co.GetTableNames(tablelist); co.Close; co.free; end;
ADO还是和TABLE或QUERY一样的使用
也是和DATABASE连接的!
begin
//取得当前的表名
if connectstring.Text='' then exit;
co:=tadoconnection.Create(self);
co.LoginPrompt:=false;
co.ConnectionString :=connectstring.Text;
co.Open;
co.GetTableNames(tablelist.Items);
co.Close;
co.free;
end;
co:tadoconnection;
tablelist:tstringlist;
begin
//取得当前的表名
tableblist:=Tstringlist.create;
if connectstring.Text='' then exit;
co:=tadoconnection.Create(self);
co.LoginPrompt:=false;
co.ConnectionString :=connectstring.Text;
co.Open;
co.GetTableNames(tablelist);
co.Close;
co.free;
end;