Subject: Re: odbc driver problem
From: Pavel Tsekov <[email-masked]>
To: Ignasi Villagrasa <[email-masked]>
Cc: [email-masked]
Date: Mon, 3 Jun 2002 12:51:17 +0200

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:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/