Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Intraweb - Server Destroy error when config


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 2 - Last Post: Feb 28, 2018 8:19 AM Last Post By: Eitan Arbel
Luis Gutiérrez

Posts: 1
Registered: 6/8/07
Intraweb - Server Destroy error when config  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 6:26 AM
I am using XE-7 and Intraweb 14.2.7 and FireDac Components

When the server controller is shutting down I free some common data structures and it works fine. Now I am trying to update the value some of those parameters in a database. When I try to get access to the FDConnection or any component (I use only two FDConnection and FDQuery), an access violation arise. It looks like the FireDac components were destroyed before.

Where is the best place to allocate that saving procedures that need to be executed only when the controller is shutting down?
Chad Hower

Posts: 613
Registered: 3/2/07
Re: Intraweb - Server Destroy error when config  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 8:09 AM   in response to: Luis Gutiérrez in response to: Luis Gutiérrez
On 2/28/2018 10:26 AM, Luis Gutiérrez wrote:
I am using XE-7 and Intraweb 14.2.7 and FireDac Components

When the server controller is shutting down I free some common data
structures and it works fine. Now I am trying to update the value
some of those parameters in a database. When I try to get access to
the FDConnection or any component (I use only two FDConnection and
FDQuery), an access violation arise. It looks like the FireDac
components were destroyed before.

Where is the best place to allocate that saving procedures that need
to be executed only when the controller is shutting down?

Where are you trying to do it now? Are they session based or it sounds
more like a global thing?
Eitan Arbel

Posts: 508
Registered: 2/24/13
Re: Intraweb - Server Destroy error when config  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Feb 28, 2018 8:19 AM   in response to: Luis Gutiérrez in response to: Luis Gutiérrez
Hi Luis
i'm not so sure i understand.

if you kill the ServerController, it will also kill the app, right...?
and you are saying that you want to access these FireDAC components AFTER you shut down the ServerController?
when the app is shutting down, it closes everything, and the last thing to be closed is the ServerController.
that means, that if you want to access these components during that process - they no longer exists.

i think the best place to put your FD's is in the UserSessionUnit, which is also a DataModule by itself anyway.
but once you shut down the ServerController, it will also close the UserSessionUnit (and all other forms) .

(sorry for my broken English, i hope i explained what i meant properly...)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02