P
pchddcat
Unregistered / Unconfirmed
GUEST, unregistred user!
function TForm1.GetTableList(ATableName: string): string;//函数是给combobox构件读取表里面的记录使用的,我现在希望把这个函数写在ms sql2000里面的自定义函数功能里面,谁可以指教一下
begin
Result := '';
with ADOQuery2 do
begin
if Active then
Close;
SQL.Text := 'select * from ' + ATableName;
Open;
First;
while not Eof do
begin
Result := Result + Fields[1].AsString + #13#10;
Next;
end;
Close;
end;
end;
begin
Result := '';
with ADOQuery2 do
begin
if Active then
Close;
SQL.Text := 'select * from ' + ATableName;
Open;
First;
while not Eof do
begin
Result := Result + Fields[1].AsString + #13#10;
Next;
end;
Close;
end;
end;