Page 1 of 1

Error with select query with FB1.5

Posted: 13.08.2008, 04:29
by lams
Hi

I am new for ZeosLib. I try convert my app from IBX to Zeoslib. I am using D6 with Fb 1.5.

Here is my query:

Select * from USER_SESSION where ('Now' - LastPageTime) > (1/60)

It works fine under IBX, but it raise EZSQLException:

-206 Column unknown Now unknown ISC error 336397208

It seems Zeoslib don't understand 'Now' reserve word under Firebird?

Any suggestion?

Cheers,

Tao

Posted: 13.08.2008, 08:25
by mdaems
Hi,

I don't think Now should be quoted. Does that exact same query work in any other query tool for firebird? As I think Now is a function it may even be necessary to add brackets like Now(). But you should check that in a Firebird manual.

Mark

Posted: 13.08.2008, 09:00
by seawolf
Hi,

Now function does not exists in Firebird .. at least you can use Date or Time function.

I suggest you using a datetime parameter where you store Delphi's now function

Posted: 13.08.2008, 23:47
by lams
Hi

Thank you for your reply. The problem is I haven't set the ZConnection dialect=1, so it don't understand the 'Now' function. Once I set ZConnection property dialect=1, everything works fine.