zSequence -

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

Moderators: gto, EgonHugeist

Post Reply
sfxcc
Senior Boarder
Senior Boarder
Posts: 95
Joined: 13.05.2010, 18:48

zSequence -

Post by sfxcc »

Can anyone explain why zquery have zSequence.

If i have a multiple / user using db i cant do zsequnec.last id because it couldnot be that the last posted, and i cant use the Query 'insert etc ect returning id' because is visual control not supposed a mix.

How can i have the last id on a open table or zquery 'select * from atable'

I have a Table
CREATE TABLE ATABLE(
AT_ID INTEGER, -with generator/trigger of + 1
AT_NAME VARCHAR(100),
AT_SOME)

i supose that if i use the zSequence on zQuery it should get the id auto whne we insert a new line on a grid for example.

Thanks
where's the code ..
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Indeed, ZSequence is a component that can get sequences from your database when it's impemented for your database. (Seems like that's implemented for FB/IB, Oracle and Postgres)
Create a ZSequence component. Fill out the sequence name. And connect it to your query. I suppose it will be used automatically for a primary key field when you leave that empty on insert.
Afterwards you can read out the ZSequence value.

Mark
Image
Post Reply