trouble in parambyname

Forum related to version 6.5.1 (alpha) and 6.6.x (beta) of ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
fajar-khairil
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 20.03.2010, 23:28
Location: Indonesia
Contact:

trouble in parambyname

Post by fajar-khairil »

hi all i new to zeos,and i got problem when using this code:

Code: Select all

 with dm.QAct do
    begin
    close;
    sql.Clear;
    sql.Text:='insert into PEMINJAMAN(TRANSID,FAKTUR,IDBUKU,IDMEMBER,TGLPINJAM,TGLKEMBALI,IDPETUGAS,JUMLAH) values(:transid,:faktur:idbuku,:idmember,:tglpinjam,:tglkembali,:idpetugas,:jumlah)';
    parambyname('transid').asstring:=transid;
    Parambyname('faktur').asstring:=flatedit1.Text;
    ParamByName('idbuku').asstring:=advstringgrid1.Cells[0,i];
    ParamByName('idmember').asstring:=flatedit2.text;
    ParamByName('tglpinjam').asdate:=strtodate(flatedit4.text);
    ParamByName('tglkembali').asdate:=strtodate(flatedit5.Text);
    ParamByName('idpetugas').asstring:=idptgs;
params.ParamByName('jumlah').asinteger:=strtoint(advstringgrid1.Cells[2,i]);
    execSQL;
    end;
  end;
the following code return Error:
Image

where my wrong code?i use firebird for database.
You do not have the required permissions to view the files attached to this post.
IllusionPerdu
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 22.02.2010, 21:23

Post by IllusionPerdu »

In your code :
sql.Text:='insert into PEMINJAMAN(TRANSID,FAKTUR,IDBUKU,IDMEMBER,TGLPINJAM,TGLKEMBALI,IDPETUGAS,JUMLAH) values(:transid,:faktur:idbuku,:idmember,:tglpinjam,:tglkembali,:idpetugas,:jumlah)';
you forget the "," near ":faktur:idbuku"
Post Reply