Recent

Author Topic: [solved] SQLite3 Without and with datamodule  (Read 313 times)

folkeu08

  • New Member
  • *
  • Posts: 38
[solved] SQLite3 Without and with datamodule
« on: January 18, 2021, 01:56:57 pm »
Hi all,
I am in the preparatory phase of a software working with an SQLite3 database.
I write the routines that allow me to write, edit and delete data in the database.
I went through a step where the connection to the database and processing components (Query and datasource) are in the form. Everything works wonderfully. (SQL_TEST_V2.rar)
My next step is to place these components in a Datamodule. I made the necessary changes but I have an error when launching the "External: SIGEGV" exception class and I do not understand what could cause it. (SQL_TEST_V3.rar).
You must add the 2 files sqlite3.def and sqlite3.dll in the folder of the executable. It's too big for add it in a zip in this forum.
Thanks in advance.
« Last Edit: January 19, 2021, 03:59:59 pm by folkeu08 »

folkeu08

  • New Member
  • *
  • Posts: 38
Re: [solved] SQLite3 Without and with datamodule
« Reply #1 on: January 19, 2021, 04:00:15 pm »
Hello,
I found the why.
The initiation of the database should not be done when the Main_form (OnCreate) is created, but when the Main_Form (OnShow) is displayed.
By moving the 'Initialize' process in an "OnShow" event, the exception no longer occurs
Fanch

JanRoza

  • Hero Member
  • *****
  • Posts: 605
    • http://www.silentwings.nl
Re: [solved] SQLite3 Without and with datamodule
« Reply #2 on: January 19, 2021, 06:22:55 pm »
I've never needed file sqlite3.def in the applications folder just putting sqlite3.dll is enough to get my database application running.
OS: Windows 10 (64 bit) / Linux Mint (64 bit)
Laz: Lazarus 2.0.10 FPC 3.2.0
       CodeTyphon 7.3 FPC 3.3.1

 

TinyPortal © 2005-2018