English 中文(简体)
表Defs。 连接缺失的半殖民地:“ODBCDRIVER=”,而不是“ODBC;DRIVER=”
原标题:TableDefs.Connect missing semicolon: "ODBCDRIVER=" instead of "ODBC;DRIVER="

今天上午刚刚注意到,当我试图从VBA的一个服务器连接桌上接通连接时,它开始使用“ODBCDVER=”而不是“ODBC;DRIVER=”。 我正在从目前的连接桌旁抽调,以作为在VBA的QeryDef的连接点。 失踪的半殖民地与QueryDef一起造成错误335: 环绕道的内障连接。

在这方面,我的职责是恢复连接。 它正在恢复以前有效的连接,而且(我记得)我没有作出任何改动。

Public Function GetObjectConnectString(ObjectName As String, ObjectType As String) As String

    GetObjectConnectString = vbNullString
    
    Dim ConnectString As String
    
    Select Case ObjectType
        Case "Table"
            ConnectString = db.TableDefs(ObjectName).Connect
        Case "Query"
            ConnectString = db.QueryDefs(ObjectName).Connect
    End Select
    
    GetObjectConnectString = ConnectString
    
End Function

Is this expected behavior and I just need to handle this response by adding in the semicolon?

Using: Microsoft Access for Microsoft 365 MSO (Version 2312 Build 16.0.17126.20078) 64-bit Microsoft Visual Basic for Applications 7.1 Version 1131

Edit

这里的职能是:

Private my_db As DAO.Database

Public Function db() As DAO.Database
    Set db = my_db

ErrEx.Catch 91, 3420  no longer set
    Set my_db = CurrentDb
    Resume 

End Function

I tried reinstalling office but am getting same result. enter image description here

问题回答

你必须更新你们的MS Access,你们的版本是2312。 这就是原因! 微软公司发布的最新消息显示,在你注意到时,这些照片显示链接。 微软公司预计不久将发布解决这一问题的新最新情况。 见这一链接,以便更了解:

https://www.accessforever.org/post/missing-semicolon-in-odbc-link





相关问题
Handling no results for docmd.applyfilter

I have an Access app where I use search functionality. I have a TextBox and a Search Button on the form, and it does a wildcard search of whatever the user enters in the TextBox, and displays the ...

Outlook 2007 CommandBarControl.Execute won t work

I recently switched to Outlook 2007 and noticed that my VBA-macros won t work. I use the following code to open a new appointment-item (and fill it automatically). It worked perfect in Outlook 2003, ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

MS Access: list macro from VBA

I have to deal with a few macros (not VBA) in an inherited Access application. In order to document them, I would like to print or list the actions in those macros, but I am very dissatisfied by ...

热门标签