LIMIT statement doesn't work
Posted: Wed 07 Feb 2007 02:05
Hi everybody;
Just few lines to ask a question..
A TSQLConnection and TSQLquery are implemented on the Form of my application. The Table on wich I try to send requests contains about 20 million records ( Database's name is "primer" and has only one LONGINT field called "PrimerNumber"). Here is the the request I send :
The last command always returns the total number of records the table contains and does not select the 100 first records.
I use Delphi 2006 with Core LAB DbExpress driver for Mysql with a 5.0.22 server version.
Thank you for your help.
Just few lines to ask a question..
A TSQLConnection and TSQLquery are implemented on the Form of my application. The Table on wich I try to send requests contains about 20 million records ( Database's name is "primer" and has only one LONGINT field called "PrimerNumber"). Here is the the request I send :
Code: Select all
Form1.SQLQuery1.SQL.Text := 'SELECT * FROM primer Limit 1,100'
Form1.SQLQuery1.Active := true;
Showmessage(IntToStr(Form1.SQLQuery1.RecordCount));
I use Delphi 2006 with Core LAB DbExpress driver for Mysql with a 5.0.22 server version.
Thank you for your help.