donvittorio
Programmer
Hi,
I am trying to create a runtime package which will contain classes that my main application can use, but I'm having problems with the data access.
My main app contains a TDatabase which points to a BDE alias. At runtime my package is dynamically loaded, and a method invoked in the package which creates a TQuery and opens it, populates an object with the returned data and then returns the object to the main app. The TQuery uses the TDatabase in the main app to connect to the database.
All this works fine, but when I close the main app I get an access violation: "Project C:\...GUI.exe faulted with message 'access violation at 0x7c9102db: write of address 0x00040ffc'. Process Stopped. Use Step or Run to continue".
If I create the TQuery but don't open it then this error does not occur. I have no idea why this error occurs! My TQuery is closed and freed ok, my package is unloaded ok, but after the form in my main app is destroyed this error occurs.
I'm using Delphi 5 BTW, I've tried to be brief so if I have missed any helpful info let me know, any ideas gratefully received.
Thanks
Steve
p.s. I know that using Delphi 5 and BDE is archaic but I'm stuck with it for now!
I am trying to create a runtime package which will contain classes that my main application can use, but I'm having problems with the data access.
My main app contains a TDatabase which points to a BDE alias. At runtime my package is dynamically loaded, and a method invoked in the package which creates a TQuery and opens it, populates an object with the returned data and then returns the object to the main app. The TQuery uses the TDatabase in the main app to connect to the database.
All this works fine, but when I close the main app I get an access violation: "Project C:\...GUI.exe faulted with message 'access violation at 0x7c9102db: write of address 0x00040ffc'. Process Stopped. Use Step or Run to continue".
If I create the TQuery but don't open it then this error does not occur. I have no idea why this error occurs! My TQuery is closed and freed ok, my package is unloaded ok, but after the form in my main app is destroyed this error occurs.
I'm using Delphi 5 BTW, I've tried to be brief so if I have missed any helpful info let me know, any ideas gratefully received.
Thanks
Steve
p.s. I know that using Delphi 5 and BDE is archaic but I'm stuck with it for now!