每当用 ADO 对象去连接远程数据库时,整个工程会停止在那里,有什么办法可以解决这个问题吗?
解决方案 »
- 窗口移动问题**********!(进来者皆有分)
- 我想用VB编写操作USB口的程序,那位有着方面的资料给一点看看?
- 我有几千个zip的压缩文件,想用程序来做解压缩,要怎么做?
- 如何美化界面?
- 请问vb的脚本代码即以vbs为扩展名的文件怎么执行啊?
- 急!谁知道用media player控件怎样做出均衡器?
- 如何处理带空格的路径问题
- msflexgrid的问题,关于行的背景色
- 用bitble可以把在活动窗口中的richtextbox中的内容拷到picture中,如果richtextbox不在当前的活动窗口中,拷贝的就不对,请问如何能够正确拷
- 只用API函数怎样打印输出一特定字串。
- SOS:菜鸟问题!
- 如何在程序中控制WebBrowser控件里面的提交按钮
connection.Open ConnectionString, UserID, Password, OptionsOptions
Optional. A ConnectOptionEnum value that determines whether this method should return after (synchronously) or before (asynchronously) the connection is establishedasynchronous operationAn operation that returns control to the calling program without waiting for the operation to complete. Before the operation is complete, code execution continues. See also synchronous operation.
能不能用中文解释一下,还有我用是的 RecordSet 的,应该如何设置呢?
Label1.Caption = "数据库连接成功!"
End SubPrivate Sub Form_Load()
Set conn = New ADODB.Connection
conn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=用户名;Initial Catalog=数据库名;Data Source=服务器名;pwd=密码", , , ADODB.ConnectOptionEnum.adAsyncConnect
End Sub
正确方法是异步连接!