Library initialization support for database applications
Original Reporter info from Mantis: BigChimp
-
Reporter name: Reinier Olislagers
Original Reporter info from Mantis: BigChimp
- Reporter name: Reinier Olislagers
Description:
Currently, instantiating a class that sets up an sqldb Firebird connection in the initialization section of a unit leads to access violations. (Similar code works in a regular program, not a library)
Moving the instantiation out of the initialization section does work.
I understand initialization order is not defined but it would be nice if support were available for this.
Steps to reproduce:
See attached example.
Requirements: any Firebird server (or presumably embedded db though untested)
Steps:
- Please update your Firebird server details in dbinterface.pas to your
situation (hostname etc)
- In businesslayer.pas, $define CRASH to see the problem.
- Compile library and test program and run.
Additional information:
Further points/discussion:
José Mejuto:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg37746.html
Mark Morgan Lloyd:
http://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg37752.html
Mantis conversion info:
- Mantis ID: 26801
- OS: Windows
- OS Build: Windows 7
- Build: 28723
- Platform: x64 (with x86 compiler)
- Version: 2.7.1