|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi all,
I would like to store for example preffered language of current session. The preffered language is used in some views to get text in the right language. One of the possibility should be a temporary table for a session. Is it possible? Andrej. |
|
#2
|
||||
|
||||
|
Quote:
you could use one real table where to keep current lang of seesion and delete it after the session expires |
|
#3
|
|||
|
|||
|
Quote:
OK, you mean to create a table t_sessions and one record in the table means one session? If so then there is a problem if the application crashes the record will not be deleted. Or is it a trigger eg. BeforeKillSession in firebird? I have to keep my table t_sessions consistent with current opened sessions. At least I have to know current sesson id. Is it possible? Thanks, Andrej. |
|
#4
|
||||
|
||||
|
If I were You in this situation this is what I would do:
Create a table containing 2 columns ... USER_ID and LANGUAGE_ID ... for example. At application startup I would run a query like Code:
DELETE FROM MYTABLE WHERE USER_ID=:USER_ID then store the session's settings/variable/language id ... and that's all ... Now you can be sure that even if your application hangs, the next time the user logs in, the previous settings are erased ![]() Good luck, Silver |
|
#5
|
|||
|
|||
|
Quote:
It is not so easy. In my application there can be connected two users with the same user_id. It seams that there is no other way then having session id. Hopefully Firebird will support it sometimes. |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > How to store session specific data? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|