This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: odbc driver problem

Hello Ignasi,

Monday, June 03, 2002, 11:24:22 AM, you wrote:

IV> I'm trying to compile an odbc driver using cygwin compiler.

IV> All seems to work properly, but when trying to link sqlconnect from odbc 
IV> sdk test application an error appears telling me the driver doesn't have 
IV> the sqlconnect function.

Are you saying that you try to link the application to the driver dll
? I don't think this is the right think to do... You have to link with
the driver manager and call the driver through various functions
exported from the driver manager dll.

IV> That's very strange because I can link directly the dll from a C 
IV> application without using odbc manager. So I think perhaps odbc manager 
IV> is looking for an special calling convention I'm not aware.

The odbc.dll exports two entries for some of its functions - one for
the Unicode version and one for the ASCII version. The Unicode version
functions use the following naming convention FunctionNameW, while the
ASCII one use FunctionNameA. So if you're trying to load dynamically
(LoadLibrary) the SQLConnect function you have to specify the proper
name for the function you want to use. If you are linking at compile time
the header files for ODBC (and other windows headers) take care for
you to link against the proper version.

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]