Sybase driver error in a 64-bit Windows server

I have a console application that works fine on a 32 bit machine. But I had a problem running the executable on a 64-bit Windows server. The error message I get is:

The type initializer for "Sybase.Data.AseClient1.AseConnection" made an exception. System.BadImageFormatException. An attempt was made to download a program with the wrong format. in Sybase.Data.AseClient.Unmanaged.AseGetDriverVersion in Sybase.Data.Aseclient1.AseConnection.CheckVersion ().

Has anyone seen this error?

Update: After compiling on X86, I get:

Inconsistency of the main version of sybdrvado20.dll. Waiting for major version "2". Version 1 is loaded in Sybase.Data.AseClient1.AseConnection.CheckVerison.

Please note that the latest version of Sybase is installed on the server.

+3
source share
3 answers

I had similar problems because the driver is 32 bit. so try creating an application for x86. You can do this in your project properties.

+1
source
+2
source

As for the error "The main version of mismatch sybdrvado20.dll ...", for me the old version of sybdrvado20.dll was replaced, which was in the bin folder of my application (located on the server) for the new one, located in C: \ Sybase \ DataAccess \ ADONET \ dll or C: \ Sybase \ DataAccess64 \ ADONET \ dll. To check the dll version, right-click the file, open "Properties" and click on the "Details" tab.

0
source

All Articles