With dm Do
Begin
dm.ztapp.ztserver.getserverinfo('dsquery', server, user, dbname, password, diver);
End;
strtemp :=
'Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial Catalog=2014bzlabinfo;Data Source=server';
strtemp := StringReplace(strtemp, 'sa', user, [rfreplaceall]);
strtemp := StringReplace(strtemp, '123', password, [rfreplaceall]);
strtemp := StringReplace(strtemp, '2014bzlabinfo', dbname, [rfreplaceall]);
strtemp := StringReplace(strtemp, 'server', server, [rfreplaceall]);
qry1.ConnectionString := strtemp;
qry1.LockType := ltBatchOptimistic;
qry1.CacheSize := 2048;
qry1.CursorType := ctStatic;
ado使用框架中的数据库配置连接数据库
最新推荐文章于 2021-09-09 20:17:24 发布