# Re: 连接SQL SERVER 问题!请问一下

Posted by Paul on October 13, 1998 at 08:12:04:

In Reply to: 连接SQL SERVER 问题!请问一下 posted by Gary Chen on October 12, 1998 at 16:33:34:

: 请问一下是否我在每载入一个from时就必需做一次SQL的连接吗?
: 有发现sql上的count数量爆增,请问是否有其它的方法可以不用在同一专案中
: 每次要执行一个from就要count一次的方法!该如何做!
: 谢谢!
: Private Sub Form_Load()
: '启始 RDO
: Conn = "Dsn=DA;DataBase=DADA;Uid=user;Pwd=1234;"
: Set rdoConn = rdoEnvironments(0).OpenConnection("", rdDriverNoPrompt, False, Conn)
*****************
Do not put the Code in a form.
Declare a public Rdo object rdoConn.
Place the connect code to a Bas module.

Follow Ups: