标签:
var tc:array[0..10000] of TADOConnection; tb:array[0..10000] of TADOTable; i:integer; s:string; begin s:=‘Provider=SQLOLEDB.1;Password=aaa;Persist Security Info=True;‘+ ‘User ID=sa;Initial Catalog=MyDB;Data Source=192.168.7.139;‘+ ‘Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;‘+ ‘Use Encryption for Data=False;‘+ ‘Tag with column collation when possible=False‘ ; for i := 0 to 10000 do begin tc[i]:=TADOConnection.Create(nil); tc[i].ConnectionString:=s; tc[i].LoginPrompt:=false; tc[i].Provider:=‘SQLOLEDB.1‘; tb[i]:=TADOTable.Create(nil); tb[i].Connection:=tc[i]; tb[i].TableName:=‘AD_Bank‘; tb[i].Active:=true; mmo1.Lines.Add(DateTimeToStr(now)+‘:‘+inttostr(i)+‘已经开始工作,共有 ‘+ IntToStr(tb[i].RecordCount)+‘ 条数据‘); mmo1.Refresh; end; end;
delphi 数据库中Connection与Query连接数量问题思考
标签:
原文地址:http://www.cnblogs.com/KKSoft/p/4846346.html