在VB中访问数据库 [英] Access Database in VB
本文介绍了在VB中访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们如何检查数据库和记录集是否打开
How can we check if database and recordset is open or not
推荐答案
您没有显示代码如此难以帮助 - 您使用什么方法连接到DB,ADODB? ODBC? OLEDB?
我认为它是ADODB - 测试数据库对象。状态。
请参阅 https://msdn.microsoft.com/ en-us / library / windows / desktop / ms675068%28v = vs.85%29.aspx [ ^ ]
示例:
You do not show code so difficult to help - what method are you using to connect to DB, ADODB? ODBC? OLEDB?.
I'll presume it is ADODB - test the database-object.State.
See https://msdn.microsoft.com/en-us/library/windows/desktop/ms675068%28v=vs.85%29.aspx[^]
Example:
If db.State = ConnectionState.Open Then
' database is open...code here
End If
同样适用于记录集。
same goes for recordsets.
这篇关于在VB中访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文