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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.49.37 with SMTP id r5mr52817699ign.3.1436386861728; Wed, 08 Jul 2015 13:21:01 -0700 (PDT) X-Received: by 10.140.96.47 with SMTP id j44mr79923qge.19.1436386861685; Wed, 08 Jul 2015 13:21:01 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!qs7no2739315igc.0!news-out.google.com!w15ni32238qge.0!nntp.google.com!m107no1468374qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 8 Jul 2015 13:21:01 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.138.95.40; posting-account=wEPvUgoAAABrLeiz_LRhQ3jeEhyfWVMH NNTP-Posting-Host: 73.138.95.40 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <62c65777-8e64-4b70-a4dc-3138a4a29b2e@googlegroups.com> Subject: Gnatcoll SQL questions From: NiGHTS Injection-Date: Wed, 08 Jul 2015 20:21:01 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26703 Date: 2015-07-08T13:21:01-07:00 List-Id: I am moderately experienced with the gnatcoll SQL library in that I have us= ed it with success and have studied some of its code and methods. Currently= I am using it as an interface to SQLite but may use it in the future for P= ostgreSQL. Here are my questions. 1. How do I delete data? I know this sounds simple but I can't delete any d= ata for the life of me. Here is an example of my code. procedure proc is Query : GNATCOLL.SQL.SQL_Query; =20 begin Query :=3D SQL_Delete (=20 From =3D> data_db.Profiles, Where =3D> data_db.Profiles.Id_Profiles =3D 1 ); =20 Database_Connection.Execute ( Query ); Database_Connection.Commit; =20 end proc; Note that Database_Connection has been instantiated, initialized and has a = good connection to the database. I also know this because the program can S= ELECT, UPDATE and INSERT just fine. But this particular DELETE function doe= s nothing at all to the database. I have also tried it omitting the entire = "Where" line so it deletes all items in the Profiles table and yet no succe= ss. 2. I would like to use GNATCOLL.SQL.Exec.Insert_And_Get_PK but I can't figu= re out how to work with it. Previously I used Last_ID after my Insert's com= mit but it always returned -1, so I figured it would be more effective to u= se Insert_And_Get_PK instead. I can't find any examples anywhere (period) s= o it would be great if I can get some pointers on how to use it. In conclusion, why does the internet have so little documentation on Gnatco= ll? I've read through the docs.adacode.com documentation on the SQL interfa= ce too many times to count but it is merely a basic overview. Does anyone k= now of a good source of reference for Gnatcoll other than the source code i= tself? Also helpful would be some kind of example source code, something I = can study from someone else's work. Thank you in advance for your help.