VB6.0上64位的mySQL ODBC连接字符串

时间:2015-10-02 14:34:56

标签: mysql vb6

我在visual basic 6.0中有一个使用MySQL ODBC连接的程序我已经安装了MySQL ODBC连接器5.2.7 64位,但是当我尝试连接我的数据源时它说

[Microsoft] [ODBC驱动程序管理器]指定的DSN包含驱动程序和应用程序之间的体系结构不匹配

有没有办法编辑我的连接字符串以使用64位或任何其他解决方案来解决此错误?这是我的代码:

Public Function dbclose()
On Error Resume Next
    ac.Close
    Set ac = Nothing
    ar.Close
    Set ar = Nothing
End Function
Public Sub openDB()
Dim connect As String

connect = "Provider=MSDataShape.1;Persist Security Info=False;Data Source=LSRS;Data Provider=MSDASQL"
strConek = "Provider=MSDataShape.1;Persist Security Info=False;Data Source=LSRS;Data Provider=MSDASQL"

With con
    .Open connect
    .CursorLocation = adUseClient
 End With
End Sub

Public Function dbuser()
Set ac = New ADODB.Connection
Set ar = New ADODB.Recordset
strConek = "Provider=MSDataShape.1;Persist Security Info=False;Data Source=LSRS;Data Provider=MSDASQL"
End Function

Public Function dbconek()
    Set ac = New ADODB.Connection
    Set ar = New ADODB.Recordset
strConek = "Provider=MSDataShape.1;Persist Security Info=False;Data Source=LSRS;Data Provider=MSDASQL"
End Function

0 个答案:

没有答案