BDE方式,可以这样:
MyStringList := TStringList.Create;
try
Session.GetTableNames('YOURodbcAlias', '',False, False, MyStringList);
{ Add the table names to a list box }
ListBox1.Items = MyStringList;
finally
MyStringList.Free;
end;
MyStringList := TStringList.Create;
try
Session.GetTableNames('YOURodbcAlias', '',False, False, MyStringList);
{ Add the table names to a list box }
ListBox1.Items = MyStringList;
finally
MyStringList.Free;
end;
解决方案 »
- 调用WebService,传递的汉字字符串参数乱码
- 关于他TreeView选中其中的item,执行一段代码,应该怎么写?
- 难道这个问题CSDN上没有人会,问了好几次没有人解答?如何在程序中实现PP中的资源共享功能
- 下载!Borland Delphi 2005 设计师架构(Arichitect)版正式版!
- 急求,hextobin用法,谢谢
- 大家见过如此问题么?
- memo光标移动到指定行
- 关于怎样删除大数据量文件?
- 不用TNNUDP并且不能用WINDOWS API函数如何写UDP通信程序?
- 我用DBGRID显示不停插入的信息,如何让记录到了DBGRID底时,刷新后再回到DBGRID的上面..
- 请告诉我Rxlib的下载地址?
- 一个超级疑难问题,直接叫板Delphi版主(不要嫌分数少) 只要解决问题,将我的全部家当全给都成!
procedure TForm1.Button1Click(Sender: TObject);var
SL: TStrings;
index: Integer;
begin
SL := TStringList.Create;
try
ADOConnection1.GetTableNames(SL, False);
for index := 0 to (SL.Count - 1) do begin
Table1.Insert;
Table1.FieldByName('Name').AsString := SL[index];
if ADOTable1.Active then ADOTable1.Close;
ADOTable1.TableName := SL[index];
ADOTable1.Open;
Table1.FieldByName('Records').AsInteger := ADOTable1.RecordCount; Table1.Post;
end;
finally
SL.Free;
ADOTable1.Close;
end;
end;