Using filterSQL property of TmyTable
Posted: Sun 29 Jan 2006 23:56
Sorry if this is horribly newbie, but I am writing my very first real app using MySQl and Mydaq (4.00.1.6) I have a DBgrid, connected to a TmyTable,
There is a record in a table called calibration from which I want to extract which is denoted by the maximum value in a certain field, and display only that in the grid.
I tested what I want manually in SQL, and I can get the required dataset with this
select * from calibration where cal_reference_id= (select max (cal_reference_id) from calibration);
but any SQL I put in the filterSQL field of Tmytable which contains this MAX function creates an error #45000 FUNCTION not found uhtvisc.max
(Uhtvisc is the database in question)
I would be very grateful for any help I can get at this point - its the first time I have tried to use any DB programming in a Delphi app.
Thanks
Steve[/b]
There is a record in a table called calibration from which I want to extract which is denoted by the maximum value in a certain field, and display only that in the grid.
I tested what I want manually in SQL, and I can get the required dataset with this
select * from calibration where cal_reference_id= (select max (cal_reference_id) from calibration);
but any SQL I put in the filterSQL field of Tmytable which contains this MAX function creates an error #45000 FUNCTION not found uhtvisc.max
(Uhtvisc is the database in question)
I would be very grateful for any help I can get at this point - its the first time I have tried to use any DB programming in a Delphi app.
Thanks
Steve[/b]