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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: Compiling GNATColl on Windows Date: Tue, 16 Dec 2014 09:48:16 +0100 Organization: A noiseless patient Spider Message-ID: References: <09729271-32e5-4d7e-999f-2299a9c975fd@googlegroups.com> <27f6331d-31d4-4626-9b41-327c49bcbb6e@googlegroups.com> <5988fe56-ed84-4a6b-b5dd-d453b3c3b2f6@googlegroups.com> <8e88a5bd-30ab-4a23-974f-6fbeff11fb8c@googlegroups.com> <9a7fe568-2d34-42be-b1be-ce0653af005b@googlegroups.com> <1ifoukt5d2s2z$.6d9y7y2fiufo$.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 16 Dec 2014 08:47:56 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="23e59b4906029a0ce22afc4c4b1f25ee"; logging-data="17655"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sQ7VJH/rnFm6dhemZCJrV" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 In-Reply-To: <1ifoukt5d2s2z$.6d9y7y2fiufo$.dlg@40tude.net> Cancel-Lock: sha1:CN8EEqPum0mTcCnBPqn2ypHj7gg= Xref: news.eternal-september.org comp.lang.ada:24033 Date: 2014-12-16T09:48:16+01:00 List-Id: On 2014-12-15 23:37, Dmitry A. Kazakov wrote: > > Roughly same in ODBC: > > declare > Environment : aliased ODBC_Environment; > Connection : aliased ODBC_Connection (Environment'Access); > begin > Connect (Connection, "My_DB", "Myself", ...); > declare > Command : aliased ODBC_Command (Connection'Access); > begin > Prepare (Command, "SELECT COL1,COL2 FROM ..."); > Execute (Command); > Fetch (Command); > Some_Variable := Get (Command'Access, 1, On_Error); > Some_Other_Variable := Get (Command'Access, 2, Always); > end; > end; > > No need to fiddle with cursors explicitly and nothing to commit, if only > reading. Actually you do need to fiddle with server-side cursors sometimes. Like if you have a very large table and want to treat all rows. I've got a simulation program that reads a table of 30_000_000 rows, that are recordings from actual events since this June. The simulation reads the data in timestamp order (which is a field in the table) and tries different algorithms on the data. The outcome is somewhat based on previous outcome, so I do not want to split the recordset. The one with best outcome survives ans is tried in real life later on. But the table grows, and I expect it to be ca 33 M rows at the ens of the year. And next year, if I record the whole year, I'll end up with 60M+ rows. For that, I _really_ like cursors on the server side. It seems like your ODBC reads the whole recordset into the clients memory? Or do I misunderstand it? --Björn