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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: Compiling GNATColl on Windows Date: Mon, 15 Dec 2014 22:55:18 +0100 Organization: A noiseless patient Spider Message-ID: References: <09729271-32e5-4d7e-999f-2299a9c975fd@googlegroups.com> <27f6331d-31d4-4626-9b41-327c49bcbb6e@googlegroups.com> <5988fe56-ed84-4a6b-b5dd-d453b3c3b2f6@googlegroups.com> <8e88a5bd-30ab-4a23-974f-6fbeff11fb8c@googlegroups.com> <9a7fe568-2d34-42be-b1be-ce0653af005b@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 15 Dec 2014 21:53:17 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9aeff6368c164dc50b2215b3caf5ef4a"; logging-data="2230"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wItnjs+Hdo26nQG8eUFTY" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 In-Reply-To: <9a7fe568-2d34-42be-b1be-ce0653af005b@googlegroups.com> Cancel-Lock: sha1:hVwWDUdAMzSRlqDf2vlR4Kvn9t0= Xref: news.eternal-september.org comp.lang.ada:24024 Date: 2014-12-15T22:55:18+01:00 List-Id: On 2014-12-15 17:10, Michael Hardeman wrote: > On Monday, December 15, 2014 10:50:01 AM UTC-5, David Botton wrote: >>> It is not looking for libpq.dll but rather libpq.a for your gcc environment. >>> >>> http://www.mingw.org/wiki/createimportlibraries >> >> If you are doing a windows centric project consider using ADO, there are database bindings in GWindows - https://sourceforge.net/projects/gnavi/ >> >> If doing something cross platform ODBC also an option see http://www.dmitry-kazakov.de/ada/components.htm >> >> David Botton > > I'll look into dmitry's ODBC bindings. They may be sufficient for my needs. > If it is just postgres you want, I use this https://dl.dropboxusercontent.com/u/26175828/sql-pg.zip It's based on an old binding from Samuel Tardieu, on which I put another layer on a somewhat higher abstraction layer. For just reading... Stm : Sql.Statement_Type; T : Sql.Transaction_Type; Sql.Connect(Db_Name => "My_Db" => user ...); Stm.Prepare("select COL1,COL2 from MY_TABLE where a = :A and b = :B"); T.Start; Stm.Set("A",Some_Value); Stm.Set("B",another_value); --Open a cursor at the backend - This executes the query Stm.Open_Cursor; Stm.Fetch(End_Of_Set); If not End_of_set then Stm.Get("COL1",Some_Variable); Stm.Get("COL2",Some_Other_Variable); end if; Stm.close_cursor(); T.Commit(); Sql.Close_Session; use Some_Variable and Some_Other_Variable -- Björn