From: Distant Worlds <distantworldscorporation@gmail.com>
Subject: Again CONSTRAINT_ERROR
Date: Thu, 30 Nov 2017 23:13:38 -0800 (PST)
Date: 2017-11-30T23:13:38-08:00 [thread overview]
Message-ID: <f51e78a2-e8a8-4620-b96f-9f2c79aab424@googlegroups.com> (raw)
Сode from example:
with gnatcoll.SQL.Postgres;
with gnatcoll.SQL.Exec;
with Ada.Text_IO;
procedure Main is
DB_Descr : GNATCOLL.SQL.Exec.Database_Description;
DB : GNATCOLL.SQL.Exec.Database_Connection;
IsOpen : Boolean;
begin
DB_Descr := GNATCOLL.SQL.Postgres.Setup(Database => "postgres",
User => "postgres",
Host => "localhost",
Password => "12345678",
Port => 5432
);
DB := DB_Descr.Build_Connection;
IsOpen := DB.Check_Connection;
if IsOpen then
Ada.Text_IO.Put_Line("Connection is open.");
else
Ada.Text_IO.Put_Line("Last Db error = " & DB.Error);
end if;
-- reset state of connection for reuse
GNATCOLL.SQL.Exec.Reset_Connection(DB);
GNATCOLL.SQL.Exec.Free (DB);
GNATCOLL.SQL.Exec.Free (DB_Descr);
end Main;
It is compiled!
At runtime: raised CONSTRAINT_ERROR : main.adb:16 access check failed
What's wrong here?
Thanks!
P.S. Linux x64(Centos 7) GNAT GPS 2017
next reply other threads:[~2017-12-01 7:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 7:13 Distant Worlds [this message]
2017-12-01 7:35 ` Again CONSTRAINT_ERROR briot.emmanuel
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox