From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: Compiling GNATColl on Windows
Date: Mon, 15 Dec 2014 22:55:18 +0100
Date: 2014-12-15T22:55:18+01:00 [thread overview]
Message-ID: <m6nl8c$25m$1@dont-email.me> (raw)
In-Reply-To: <9a7fe568-2d34-42be-b1be-ce0653af005b@googlegroups.com>
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
next prev parent reply other threads:[~2014-12-15 21:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-15 13:06 Compiling GNATColl on Windows mhardeman25
2014-12-15 13:25 ` Michael Hardeman
2014-12-15 15:47 ` David Botton
2014-12-15 15:49 ` David Botton
2014-12-15 16:10 ` Michael Hardeman
2014-12-15 21:55 ` Björn Lundin [this message]
2014-12-15 22:37 ` Dmitry A. Kazakov
2014-12-15 23:14 ` Björn Lundin
2014-12-16 8:48 ` Björn Lundin
2014-12-16 10:10 ` Dmitry A. Kazakov
2014-12-16 10:21 ` Björn Lundin
2014-12-15 23:00 ` Björn Lundin
2014-12-15 16:09 ` Michael Hardeman
2014-12-15 19:46 ` Shark8
2014-12-16 17:50 ` Michael Hardeman
2014-12-16 20:27 ` Björn Lundin
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox