CnPack Forum


 
Subject: 数据库连接池的应用
hfutzhu
新警察
Rank: 1



UID 42105
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2009-3-30
Status Offline
Post at 2009-3-31 00:00  Profile | Blog | P.M. 
数据库连接池的应用

我想问一下,ADOConPool这个组件怎么用。因为,我在程序里要有好多个线程一起处理数据库可能!
var
  con: TADOConnection;
begin
  with qry1 do
  begin
    acp1.GetConnection(con); //获取连接
    Connection := con;
    sql.add(sql语句);
    Open;
   
    acp1.ReleaseConnection(con);//释放连接
  end;
end;

这样用对么?????????
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2009-3-31 08:07  Profile | Blog | P.M. 
请参考此帖的内容尤其是回帖部分?
http://bbs.cnpack.org/viewthread.php?tid=2655&extra=page%3D1
Top
jAmEs_
灌水部部长
Rank: 8Rank: 8



Medal No.1  
UID 886
Digest Posts 0
Credits 1134
Posts 600
点点分 1134
Reading Access 10
Registered 2005-6-5
Location 广东
Status Offline
Post at 2009-3-31 09:34  Profile | Blog | P.M. 
感覺連接池用處不大吧
Top
hfutzhu
新警察
Rank: 1



UID 42105
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2009-3-30
Status Offline
Post at 2009-3-31 10:13  Profile | Blog | P.M. 
我这边要用啊,数据采集!每隔1分钟就要N个线程(可能一起),插入数据到数据库!!!
Top
hfutzhu
新警察
Rank: 1



UID 42105
Digest Posts 0
Credits 8
Posts 3
点点分 8
Reading Access 10
Registered 2009-3-30
Status Offline
Post at 2009-3-31 21:15  Profile | Blog | P.M. 
很郁闷啊!
Top
 




All times are GMT++8, the time now is 2024-11-22 13:29

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.009014 second(s), 9 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP