小编Awe*_*rog的帖子

查找Access版本

我在下面的代码确定了Access的版本.它在大多数PC上运行迅速.我们还有四台终端服务器.在两台终端服务器上运行正常.另外两个,这段代码需要15秒才能运行.

所有四个终端服务器都具有Access 2003运行时.我无法弄清楚为什么在两台服务器上运行需要更长的时间.它是权限吗?或者安装Access运行时的方式有些错误?

如果有更好,更快的方法来确定版本,我也会对此感兴趣.谢谢Awesomo

   ' Determine the Access version by creating an
   ' Access.Application object and looking at
   ' its Version property.
   Private Function GetAccessVersionName() As String
      Dim obj As Object = CreateObject("Access.Application")
      Dim result As String = "Access.Application." & _
          obj.Version
      obj.Quit()
      Return result
   End Function

   ' Get the Access version number from the name.
   Private Function GetAccessVersionNumber() As Integer
      Dim txt As String = GetAccessVersionName()
      Dim pos2 As Integer = txt.LastIndexOf(".")
      Dim pos1 As Integer = txt.LastIndexOf(".", pos2 …
Run Code Online (Sandbox Code Playgroud)

vb.net ms-access

3
推荐指数
1
解决办法
5747
查看次数

标签 统计

ms-access ×1

vb.net ×1