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

  • From: Delphi Inspiration <delphi@xxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Wed, 04 Apr 2012 19:50:31 +0200

On 04.04.2012 19:30, Jon Burnham wrote:

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

I am afraid, we can not simply walk you through unknown territory. I am
missing your source code for orientation.

> 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;

This does not execute a TDISQLite3UniDirQuery. It just sets the SQL to
select data. You must then open the TDISQLite3UniDirQuery like

  TDISQLite3UniDirQuery.Open;

or

  TDISQLite3UniDirQuery.Active := True;

This is common TDataSet practice. Read the Delphi help for details.

> form2.dqlite1.Execute(DQLGEO);

I do not know what "dqlite1" is.

> 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';

Selects only make sense or no sense when applied to a particular
database schema. Again, I need to see your full source code and database
to help.

> 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.

You can bind DB controls visually to TDISQLite3UniDirQuery directly,
even without CDS. See the \Demos\DISQLite3_World\DISQLite3_World.dpr
project.

But since TDISQLite3UniDirQuery is uni-directional only, this does not
work for controls which display multiple records, like grids. For those,
you must use CDS. See
\Demos\DISQLite3_World\DISQLite3_World_ClientDataSet.dpr or the demo
attached to my previous message.

Ralf
_______________________________________________
Delphi Inspiration mailing list
yunqa@xxxxxxxxxxxxx
//www.freelists.org/list/yunqa



Other related posts: