From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: porting a Gnat Ada program with ODBC code to Windows Date: Fri, 20 Dec 2013 17:46:21 +0100 Organization: cbb software GmbH Message-ID: <3xrxtz09rjlg$.8zo2rpkbh328$.dlg@40tude.net> References: <8ae80e57-4c43-408b-9d99-79f879e85ee8@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: K+4Sku9d0Ugkd/hEqjWvjA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:18072 Date: 2013-12-20T17:46:21+01:00 List-Id: On Fri, 20 Dec 2013 07:06:44 -0800 (PST), Graham Stark wrote: > is anyone out there successfully running a Gnat Ada program on Windows > which uses the ODBC database drivers? Yes, of course. > I've been asked to port this big program: > > https://github.com/grahamstark/wales_social_care > > to a Windows server but can't get the database connections to work at all, > even on simple test programs. ODBC connectivity requires configuration of the DSN, user credentials, all specific to the concrete DBMS and ODBC driver. > I'm using the original Gnade odbc interface; GNADE ODBC didn't incorporate changes MS made to the ODBC API, which were significant. The summary is here: http://support.microsoft.com/kb/298678 > I have Cygwin installed and have used it to build a clean version of > UnixODBC. I've also tried the IODBC libraries that ship with Cygwin. It is a quite strange idea to use UnixODBC instead of ODBC32 (native for Windows). Technically, it should work if you install necessary ODBC drivers under Cygwin (if you find them) and edit odbc.ini for your DSNs. > I get ACCESS_VIOLATION exceptions every time any of the linked to ODBC > functions gets called (SQLAllocHandle and so on). AFAIK, UnixODBC honestly followed MS changes => GNADE ought to be broken regardless the driver manager and OS you are using. > Has anyone got this to work. ODBC works perfectly well with Ada both under Linux and Windows. > thanks (and happy Christmas) Same to you. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de