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

  • From: "Jon Burnham" <jba@xxxxxxxxxxxxxx>
  • To: <yunqa@xxxxxxxxxxxxx>
  • Date: Wed, 4 Apr 2012 14:03:07 +0100

Hi Ralf

OK, about to give up on this. I am confused by the slightly unusual way of 
doing things in DisqLite.

I simply want to display the result of a query in a grid. I understand that 
they is no direct way of talking to the uniquery control and that it has to be 
done via a clientdataset and provider.

So I have a static db called geo.

DB=> UniQ => Dprovider => CDS => Datasource => Grid.

The data is showing at design time and runtime.

I have tried both, 

Form2.DISQLite3UniDirQuery1.SelectSQL := DQLGEO;

Form2.dqlite1.Execute16(DQLGEO); 

... this should find a row, and there is no complaint when run.

SQL:

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

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.

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.

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

Kind regards

Jon



-----Original Message-----
From: yunqa-bounce@xxxxxxxxxxxxx [mailto:yunqa-bounce@xxxxxxxxxxxxx] On Behalf 
Of Jon Burnham
Sent: 02 April 2012 12:04
To: yunqa@xxxxxxxxxxxxx
Subject: [yunqa.de] Re: Disqlite 3 Pro : Temporary table question

The const SQL query suggestion works brilliantly, thanks.



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

On 02.04.2012 11:16, Jon Burnham wrote:

> 2) Best way of storing SQL statements persistently, any thoughts - 
> perhaps just a hidden memo with labels ?

const
  SQL = 'select * from table';

Fastest, most memory efficient and easiest to maintain.

> 3) Those demo's need to be updated for XE2.

According to my testing, the DISQLite3 demos compile and run well with Delphi 
XE2, both Win32 and Win64. Which demo does not work for you? Your statement 
needs evidence and accuracy.

> I still think form based demo's are much easier to understand.

Thanks for sharing your point of view. Others might prefer a different 
approach. To satisfy both likings, DISQLite3 comes with plenty of demos, both 
console and form based.

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



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



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



Other related posts: