Hi,

I see. The problem is that there was a change in version 1.4.181 with the
processing of JDBC escape sequences. This change affected both the parser
(which is running on the server) and the JDBC API (which is running on the
client). So I'm afraid if you (or a tool you use) use the syntax "{t
'<time>}", or "{ts '<timestamp>'}", or "{d '<data>'}", then both the client
and the server need to be upgraded to version 1.4.181. Or both the client
and the server need to be below that version.

Regards,
Thomas


On Sun, Aug 10, 2014 at 1:10 PM, sim <[email protected]
<javascript:_e(%7B%7D,'cvml','[email protected]');>> wrote:

> Hi,
>
> Client based on 1.4.181 and Slick 2.1.0 is not working correctly with
> server h2 1.3.176.
>
> If statement is like
>
>   def cliAbonPayments(sd: Date,ed: Date) = {
>     val q = for{
>       p <- payments if p.pay_date.between(sd,ed)
>       c <- clients if p.cli_id === c.cli_id
>       ad <- admins if p.adm_id === ad.adm_id
>       ca <- clients if ad.adm_cliid === ca.cli_id
>       pa <- packetofabonements if p.pay_id === pa.pay_id
>       a <- abonements if pa.abo_id === a.abo_id
>     } yield ({c.cli_sname ++ " " ++ c.cli_fname ++ " " ++
> c.cli_mname},a.abo_name,
>       a.abo_price,pa.pab_fee,p.pay_date,c.cli_rdate,c.cli_gen,
>         {ca.cli_sname ++ " " ++ ca.cli_fname ++ " " ++ ca.cli_mname})
>     def res = db withSession {
>       implicit session =>
>         q.list
>     }
>     res
>   }
>
> i got an exception -
>
> 2014-08-10 09:55:01 [CronTasks-akka.actor.default-dispatcher-4] ERROR
> n.u.s.s.StatReport - Exception - Syntax error in SQL statement "SELECT
> X2.X3, X2.X4, X2.X5, X2.X6, X2.X7, X2.X8, X2.X9, X2.X10 FROM (SELECT
> (((X11.""CLI_SNAME""||' ')||X11.""CLI_FNAME"")||' ')||X11.""CLI_MNAME"" AS
> X3, X12.""ABO_NAME"" AS X4, X12.""ABO_PRICE"" AS X5, X13.""PAB_FEE"" AS X6,
> X14.""PAY_DATE"" AS X7, X11.""CLI_RDATE"" AS X8, X11.""CLI_GEN"" AS X9,
> (((X15.""CLI_SNAME""||' ')||X15.""CLI_FNAME"")||' ')||X15.""CLI_MNAME"" AS
> X10 FROM ""PAYMENTS"" X14, ""CLIENTS"" X11, ""ADMINS"" X16, ""CLIENTS""
> X15, ""PACKETOFABONEMENTS"" X13, ""ABONEMENTS"" X12 WHERE
> ((((X14.""PAY_DATE"" BETWEEN  D '2014-08-10'[*]  AND  D '2014-08-10'  AND
> (X14.""CLI_ID"" = X11.""CLI_ID"")) AND (X14.""ADM_ID"" = X16.""ADM_ID""))
> AND (X16.""ADM_CLIID"" = X15.""CLI_ID"")) AND (X14.""PAY_ID"" =
> X13.""PAY_ID"")) AND (X13.""ABO_ID"" = X12.""ABO_ID"")) X2 "; expected ".,
> (, [, ::, *, /, %, +, -, ||, ~, !~, AND"; SQL statement:
> select x2.x3, x2.x4, x2.x5, x2.x6, x2.x7, x2.x8, x2.x9, x2.x10 from
> (select (((x11."CLI_SNAME"||' ')||x11."CLI_FNAME")||' ')||x11."CLI_MNAME"
> as x3, x12."ABO_NAME" as x4, x12."ABO_PRICE" as x5, x13."PAB_FEE" as x6,
> x14."PAY_DATE" as x7, x11."CLI_RDATE" as x8, x11."CLI_GEN" as x9,
> (((x15."CLI_SNAME"||' ')||x15."CLI_FNAME")||' ')||x15."CLI_MNAME" as x10
> from "PAYMENTS" x14, "CLIENTS" x11, "ADMINS" x16, "CLIENTS" x15,
> "PACKETOFABONEMENTS" x13, "ABONEMENTS" x12 where ((((x14."PAY_DATE"
> between  d '2014-08-10'  and  d '2014-08-10'  and (x14."CLI_ID" =
> x11."CLI_ID")) and (x14."ADM_ID" = x16."ADM_ID")) and (x16."ADM_CLIID" =
> x15."CLI_ID")) and (x14."PAY_ID" = x13."PAY_ID")) and (x13."ABO_ID" =
> x12."ABO_ID")) x2 [42001-181]
>
> But, everything is ok if (client uses  h2 1.4.180  and server h2 1.3.176)
> or (server uses h2 1.4.181)
>
> --
> You received this message because you are subscribed to the Google Groups
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected]
> <javascript:_e(%7B%7D,'cvml','h2-database%[email protected]');>
> .
> To post to this group, send email to [email protected]
> <javascript:_e(%7B%7D,'cvml','[email protected]');>.
> Visit this group at http://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to