..I have code like this :
with sqlquery do
begin
....
....
sql.add('insert into tbtran'); sql.add('(kode_m,nama_kom,tgl,mulai,selesai,durasi,total_internet,total_pr,bayar,kode_op)');
sql.add('values(:pkm,:pnk,:ptgl,:pm,:ps,:pd,:pti,:ptp,:pb,:pko)');
Prepare;
Params.ParamByName('pko').AsString:='22';
Params.ParamByName('pkm').asstring:='001011';
Params.ParamByName('pnk').AsInteger:=1;
Params.ParamByName('ptgl').asdate:=Date; //mysql date type,...i think this
//is the problem
Params.ParamByName('pm').Asstring:='12:12:22';
Params.ParamByName('ps').Asstring:='13:22:11';
Params.ParamByName('pd').Asstring:='11:22:11';
Params.ParamByName('pti').Asinteger:=strtoint('7');
Params.ParamByName('ptp').Asinteger:=strtoint('6');
Params.ParamByName('pb').Asinteger:=strtoint('5');
.........
.......
I got this Error :
Project raised exception class 'EDatabaseError' with message:
MySQL50Connection1 :Error executing query:You have an error in your SQL
syntax;check the manual that corresponds to your MySQL server version for the
right syntax to use near '0)' at line 3
I've try "ptgl" param as String and Date but still get error....
I hope someone can help me ....
TIA
[/code]