* Problem (and solution) with gnatcoll_db2ada
@ 2013-01-25 15:23 mockturtle
2013-01-28 11:09 ` briot.emmanuel
2013-01-28 15:33 ` ake.ragnar.dahlgren
0 siblings, 2 replies; 3+ messages in thread
From: mockturtle @ 2013-01-25 15:23 UTC (permalink / raw)
Dear all,
maybe this is of some interest to few people, but I think it is worth documenting it.
Recently I began working with AWS and GNATCOLL.SQL. According to the documentation about the gnatcoll_db2ada tool
http://docs.adacore.com/gnatcoll-docs/sql.html#the-gnatcoll-db2ada-tool
by using the option '-adacreate' gnatcoll_db2ada creates (in package Database) a procedure Create_Database that creates the database at runtime. However, when I try to compile database.adb I get the following error
database.adb:136:15: non-visible declaration at gnatcoll-sql-exec.ads:208
The problem is that the procedure Database_Connection called at the end of database.adb is in GNATCOLL.SQL.Exec, not visible from database.adb.
A "with + use" will, of course, cure the problem, but, as you can imagine, it gets pretty boring to add "with + use" every time you change your scheme (not often, fortunately, but it happens during the development...).
Since I still have around the sources of gnatcoll_db2ada, I searched for the bug and I discovered that it suffices to add just one line in gnatcoll_db2ada-generate.adb
The following is the result of
diff gnatcoll_db2ada-generate.adb gnatcoll_db2ada-generate.adb~
442,443d441
< Put_Line
< (Body_File, "with GNATCOLL.SQL.Exec; use GNATCOLL.SQL.Exec;");
in case you want to apply the correction yourself. My version is quite new, I downloaded the source archive on Jan 18.
I hope this can be useful.
Best regards,
Riccardo Bernardini
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem (and solution) with gnatcoll_db2ada
2013-01-25 15:23 Problem (and solution) with gnatcoll_db2ada mockturtle
@ 2013-01-28 11:09 ` briot.emmanuel
2013-01-28 15:33 ` ake.ragnar.dahlgren
1 sibling, 0 replies; 3+ messages in thread
From: briot.emmanuel @ 2013-01-28 11:09 UTC (permalink / raw)
Patch added to the development version of gnatcoll.
Thanks
Emmanuel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Problem (and solution) with gnatcoll_db2ada
2013-01-25 15:23 Problem (and solution) with gnatcoll_db2ada mockturtle
2013-01-28 11:09 ` briot.emmanuel
@ 2013-01-28 15:33 ` ake.ragnar.dahlgren
1 sibling, 0 replies; 3+ messages in thread
From: ake.ragnar.dahlgren @ 2013-01-28 15:33 UTC (permalink / raw)
On Friday, January 25, 2013 4:23:33 PM UTC+1, mockturtle wrote:
> Dear all, maybe this is of some interest to few people, but I think it is worth documenting it. Recently I began working with AWS and GNATCOLL.SQL. According to the documentation about the gnatcoll_db2ada tool http://docs.adacore.com/gnatcoll-docs/sql.html#the-gnatcoll-db2ada-tool by using the option '-adacreate' gnatcoll_db2ada creates (in package Database) a procedure Create_Database that creates the database at runtime. However, when I try to compile database.adb I get the following error database.adb:136:15: non-visible declaration at gnatcoll-sql-exec.ads:208 The problem is that the procedure Database_Connection called at the end of database.adb is in GNATCOLL.SQL.Exec, not visible from database.adb. A "with + use" will, of course, cure the problem, but, as you can imagine, it gets pretty boring to add "with + use" every time you change your scheme (not often, fortunately, but it happens during the development...). Since I still have around the sources of gnatcoll_db2ada, I searched for the bug and I discovered that it suffices to add just one line in gnatcoll_db2ada-generate.adb The following is the result of diff gnatcoll_db2ada-generate.adb gnatcoll_db2ada-generate.adb~ 442,443d441 < Put_Line < (Body_File, "with GNATCOLL.SQL.Exec; use GNATCOLL.SQL.Exec;"); in case you want to apply the correction yourself. My version is quite new, I downloaded the source archive on Jan 18. I hope this can be useful. Best regards, Riccardo Bernardini
Thanks for reporting this issue. I've encountered it too.
Best regards,
Åke Ragnar Dahlgren
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-28 15:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-25 15:23 Problem (and solution) with gnatcoll_db2ada mockturtle
2013-01-28 11:09 ` briot.emmanuel
2013-01-28 15:33 ` ake.ragnar.dahlgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox