|
8#
楼主 |
发表于 2010-12-1 16:57:32
|
只看该作者
我的ADP在每次打开的时候是用下面的代码连接到数据库的.
sqlconn = "SQLOLEDB.1ASSWORD=" & password1 & "ERSIST SECURITY INFO=FALSE;USER ID=" & sa1 & ";INITIAL CATALOG=" & data1 & ";DATA SOURCE=" & source1 & ";Connect Timeout=0;Network Library=dbmssocn"
Dim sConnectionString As String
sConnectionString = "Provider=" & sqlconn
Application.CurrentProject.OpenConnection sConnectionString
==============================================
完后,我在里面执行存诸过程方法是:
Dim cn As ADODB.Connection
Set cn = CurrentProject.Connection
cn.Execute "xs_pro月结删除明细帐 " & nd & "," & m
因为数据比较多,总是超时.如何解决?请教大家.
|
|