[Lazarus] Inactive Dataset
Graeme Geldenhuys
graemeg.lists at gmail.com
Wed May 28 19:59:58 CEST 2008
2008/5/28 Juan Cortés Cuesta <juco at eima.vcl.cu>:
> I Pasted your code in my Lazarus' Text Editor....
> I think the error is in the Query.
> Try with:
>
> SQLQuery1.SQL.Text:='SELECT enquiryreferencenumber FROM
> registration WHERE fname=' + #39 + fname.Text+ #39 + ' AND
> sname=' + #39 +sname.Text+ #39 + ' ORDER BY enquiryreferencenumber DESC LIMIT
> 1;';
>
Alternatively, use parameters in you query....
Query1.SQL.Text :=
'SELECT fname,sname,id,comboboxcourse,' +
' studentnumber,'enquirydate,enquiryreferencenumber ' +
'FROM registration ' +
'WHERE fname=:fname';
Query1.ParamAsString['fname'] := 'Dave';
This removes the ugly double quotes and hash values etc...
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list