Error with select query with FB1.5

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
lams
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 13.08.2008, 04:24

Error with select query with FB1.5

Post 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
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post 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
Image
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post 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
lams
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 13.08.2008, 04:24

Post 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.
Post Reply