Dear,
Its great you had succesfully came out with thise feature. However, it may not be what the user wanted.
User may want to programmatically set the TOraSession to be offline whenever they wanted. Perhaps you could enhanced these feature to cover :-
a. Introduce a new property such as Offline in TOraQuery to detach itself from current connected session, leaving the active session to perform some other task or to be disconnected programmatically.
and
b. Allow user the freedom to programmatically issue TOraSession.connect and TOraSession.Disconnect within their code to disconnect their active session when it is time to do it under certain requirements.
Current Disconnect model works only when the session is not active or performing any task. But when and on what rule ? I have tested this feature and the session is always connected even tough I am not doing anything on that session. Maybe after 1 or 2 minutes it will disconnect itself, but by that time, I may need to use it again.
Regards
Disconnect Model and working Offline in ODAC
-
Challenger
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53
In disconnect mode connection is opened only when it is required. After perfoming all server calls connection is closed automatically until next server call is required. User can control this behavior by calling Connect/Disconnect methods. If you open DataSet in diconnect mode, cursor and session will be automaticaly closed when all data is fetched. So if your session doesn't close check that your DataSet has fetched all data. For this purpose you can use the Fetched property. For more information about disconnect mode please refer to ODAC help, the topic "Working with Disconnect Mode".