我用下列代码把局域网中的sqlserver全部调出来,我想通过文本框输入用户,密码
进行测试怎么办
var
SQLServer:Variant;
ServerList:Variant;
i,nServers:integer;
sRetValue:String;
jsj_name:string;
begin
SQLServer := CreateOleObject('SQLDMO.Application');
ServerList:= SQLServer.ListAvailableSQLServers; //获取局域网中装有sqlserver的计算机名
nServers:=ServerList.Count;
for i:=1 to nServers do
begin
f_mc.Items.Add(Serverlist.item(i));
end;
SQLServer:=NULL;//释放
serverList:=NULL;
end;