ODBC error on 64bit mahcine

triphen
triphen used Ask the Experts™
on
Hello Experts,

I released a new build of my application and now on 64bit machines I am getting this error:


ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application

This was working fine on my last build and I didnt really change anything that has to do with the ODBC or anything like that.



        'Look for SQL Engine
        Try
            Dim str As String = "DSN=sqlbase;uid=dba;pwd=password;"
            Dim con As New OdbcConnection(str)
            Dim com As String = ("select company from sysinfo")
            Dim Adpt As New OdbcDataAdapter(com, con)
            Dim ds As New DataSet()
            Adpt.Fill(ds)
        Catch ex As Exception
            MessageBox.Show("SQL Engine not running! Closing application.  " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End
            Exit Sub
        End Try

Open in new window



SyBase SQL Anywhere v10
VB.net VS2010
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
You need to install 32-bit versions of the SyBase drivers on the 64-bit clients.

-saige-
Commented:
Problem solved.....

I had changed the Target CPU to "Any CPU" during my last build. I changed it back to x86 and all is well.

Commented:
I was just about to recommend that as well.  ;)

-saige-

Author

Commented:
I found my issue. It was the Target CPU setting.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial