Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
Problems using OnGetParams.. |
Mon, Nov 26 2007 7:47 PM | Permanent Link |
"Hüseyin Aliz" | Hi All,
I am using following script: ========================================================================== select ordrenr, varenr, "antal" - "leverettidligere" as restvalue into "\memory\temp1" from "ordrspec.dat" where ordrenr = drenum; update "varer.dat" set "antal på lager" = "antal på lager" - t2.restvalue from "varer.dat", "\memory\temp1" t2 where "varer.dat".varenr = t2.varenr; update "ordrspec.dat" set "leverettidligere" = "antal" where "ordrspec.dat".ordrenr = drenum; insert into "ordrelev.dat" (ordrenr, varenr, tekst, leveret, dato) select ordrenr, varenr, tekst, antal-leverettidligere, :dato from "ordrspec.dat" where ordrenr = drenum; ========================================================================== And following is the code in the app: procedure TOrdreForm.AllButtonClick(Sender: TObject); begin with Query1 do begin DatabaseName := 'DATABASE'; unprepare; prepare; execsql; end; end; Showmessage('Done!'); end; procedure TOrdreForm.Query1GetParams(Sender: TObject); begin with (Sender as TDBISAMQuery) do begin if (Params.FindParam('Ordrenum') <> nil) then ParamByName('Ordrenum').AsInteger:= OrdreSpec_TableOrdrenr.value else if (Params.FindParam('Dato') <> nil) then ParamByName('Dato').AsDate:=Now; end; end; Compiles OK but when i run the app, it returns with "DBISAM Engine Error # 11949 SQL parsing error - Invalid expression ? found in SELECT SQL statement at line 16, column 56" It complains about ":dato" in last Query. What's wrong here? Thanks in advance. Regards, Hüseyin |
Tue, Nov 27 2007 1:33 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hüseyin,
<< Compiles OK but when i run the app, it returns with "DBISAM Engine Error # 11949 SQL parsing error - Invalid expression ? found in SELECT SQL statement at line 16, column 56" It complains about ":dato" in last Query. >> You can't use a parameter in the list of SELECT expressions for a query. -- Tim Young Elevate Software www.elevatesoft.com |
Tue, Nov 27 2007 6:25 PM | Permanent Link |
"Hüseyin Aliz" | Ok
"Tim Young [Elevate Software]" <timyoung@elevatesoft.com> skrev i en meddelelse news:A37B3D26-BB9B-4FFC-BF81-527C8F9E9E7D@news.elevatesoft.com... > Hüseyin, > > << Compiles OK but when i run the app, it returns with > > "DBISAM Engine Error # 11949 SQL parsing error - Invalid expression ? > found in SELECT SQL statement at line 16, column 56" > > It complains about ":dato" in last Query. >> > > You can't use a parameter in the list of SELECT expressions for a query. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > |
This web page was last updated on Saturday, May 4, 2024 at 09:18 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |