size:=255;
GetMem(ComputerName,size);
GetComputerName(ComputerName,Size);
//get computer name
workid:=strpas(ComputerName);
str:='Provider=SQLOLEDB.1;Persist Security Info=False;User ID='+peoplename+';Initial Catalog=数据库名;Data Source='
+sername+';Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID='+workid;
ADOConnection1.ConnectionString:=str;
ADOConnection1.Open ;
连接要做对,那么一切ok 上面的连sql server ,如果还有问题,send mail to me
klytx@wz163.com