[yunqa.de] Re: Disqlite 3 Pro : Temporary table question

  • From: "Jon Burnham" <jba@xxxxxxxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Wed, 4 Apr 2012 18:30:33 +0100

OK Ralf

Please can we work this through bit by bit (I had the demo you mentioned open 
anyway - does not help). 

Once I have got the DI side running in a supposedly correct way, I can then 
move on to the CDS side. So,

Q 1.

Do execute the query on the table or the query control. I have tried either or 
both of these.

form2.DISQLite3UniDirQuery1.SelectSQL := DQLGEO;



I am not doing anything accept this, as all controls are active at design-time 
- so no opening or closing, there seems to be no 'execute' for the query 

Q 2.

Using your 'constants' suggestion - does this SQL syntax look correct to you 
for use in the controls:

DQLGEO =  'SELECT "geo.CountryCode", "geo.CountryName" ' + #13#10 +
         'FROM geo ' + #13#10 +
         'WHERE ' + #13#10 +
         ':beg3 >= "geo.StartIPNum" AND ' + #13#10 +
         ':beg3 <= "geo.EndIPNum" ' + #13#10 +
         'LIMIT 1';

Q 3.

There seems to be no way of binding the DI controls visually without using 
something like CDS. Or is there? I want to know if the query is being run OK.


-----Original Message-----
From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf 
Of Delphi Inspiration
Sent: 04 April 2012 16:26
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: Disqlite 3 Pro : Temporary table question

On 04.04.2012 15:03, Jon Burnham wrote:

> But I cannot get the cursor to move to the record in the grid. I have 
> set up the param, and it this SQL works with other DB providers.

I am afraid, I can not extract your problem from just your description.
I need to see your source code to know what you are talking about exactly.

> Secondly, what is the best syntax for extracting the field data from 
> the row once found. I cannot check that the DB is accepting the query 
> properly, which is why I usually use visual checks.

  FieldValue := ClientDataSet.FieldByName('Name').AsString;

> The demos are all too much, as they work at too high a level for me 
> for this particular problem.

Did you look at the Demo project in this folder?


The demo shows how to display data in TDBGrid using TDISQLite3UniDirQuery, 
TDataSetProvider and TClientDataset. It should be very close to what you want 
to implement.

Since you like to use TParams, I have added data filtering based on using 
TParams and attached to this message. I hope you find it useful.


Delphi Inspiration mailing list

Other related posts: