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 2002:a05:620a:a5c:: with SMTP id j28mr34314080qka.218.1577461161810; Fri, 27 Dec 2019 07:39:21 -0800 (PST) X-Received: by 2002:aca:d985:: with SMTP id q127mr3363528oig.132.1577461161448; Fri, 27 Dec 2019 07:39:21 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!g89no1305476qtd.0!news-out.google.com!w29ni264qtc.0!nntp.google.com!g89no1305474qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 27 Dec 2019 07:39:21 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=83.220.239.91; posting-account=YB4WOgoAAABLG9D7qoJiPBc6EJSzsPDF NNTP-Posting-Host: 83.220.239.91 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: gnatcoll_db2ada problem "Database not supported:" From: George J Injection-Date: Fri, 27 Dec 2019 15:39:21 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:57766 Date: 2019-12-27T07:39:21-08:00 List-Id: =D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 27 =D0=B4=D0=B5=D0=BA=D0=B0=D0= =B1=D1=80=D1=8F 2019 =D0=B3., 14:26:55 UTC+3 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7= =D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Dmitry A. Kazakov =D0=BD=D0=B0= =D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > On 2019-12-27 11:48, George J wrote: >=20 > > And my question is. What if i already have some big database and want t= o create an Ada app to work with. >=20 > That is 80% of the cases. >=20 > > Can i work with it in the same way? >=20 > You can work in a normal way, i.e. create environment (if required),=20 > open connection, prepare statement, bind parameters, execute statement,= =20 > fetch results. It is no rocket science. >=20 > > May be i don't know something. Or i can work with db file with connecti= ng to him and send direct SQL queries? >=20 > That is the way to do it. >=20 > > I've never worked with databases with Ada so this theme is very difficu= lt for me now. But interesting) >=20 > Ada does not differ in working with DB to any other language. >=20 > I understand that you are stuck with some higher-level DB client=20 > abstraction. I would tentatively suggest to use a more direct method. >=20 > In my view if abstraction is needed, then it must be higher, e.g. a=20 > persistency layer abstracting all DB and whole SQL mess away. Otherwise,= =20 > it only complicates the ugly stuff, IMO. >=20 > P.S. Talking about big databases, SQLite3 is absolutely unsuitable for=20 > dealing with a big database. It is not an intended use case of. >=20 > --=20 > Regards, > Dmitry A. Kazakov > http://www.dmitry-kazakov.de Thanks, Dmitry! Yes, you're right, i've lost in abstractions and couldn't understand how to= work with .db file with gnatcoll_db2ada. I wanted also to try this example - https://www.adacore.com/gems/gem-129-ty= pe-safe-database-api-part-1/, but i have the error described below. And database not so big, it's about 8-10 tables contains not much data. So = i've decided to use sqlite. And i couldn't find any simple example of using gnatcoll-db or any other mo= dule with database, like 1. open db - "Some_Open_Proc ("test.db");" 2. get some values - "SQL_Query_Proc ( "GET * FROM .....", ... );" 3. close conne=D1=81tion - "Some_Close_Proc ( ... );" Now i've found some examples using ADO and AdaBase modules, so i will study= them. Thanks!