Recent

Author Topic: (SOLVED) SQLite problem (only windows)  (Read 6859 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
(SOLVED) SQLite problem (only windows)
« on: July 11, 2011, 08:17:38 am »
I think I've found a few mistakes in the management of DB SqlLite, if you take the attached code and compile it you will see that there are 4 rows in the DBGrid and if you press the button should clear the line that contains 'pippo'. But if you close and reopen the program, there are one less, can you tell me why? And can you tell me how to solve it? thanks
« Last Edit: July 12, 2011, 04:29:56 pm by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem
« Reply #1 on: July 11, 2011, 08:50:05 am »
I forgot, the problem occurs only on Microsoft, I have tried both XP (SP3) and Windows 7.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #2 on: July 11, 2011, 10:31:33 am »
Has anyone tried the attached program? Why do I get feedback from someone if the problem is also found by others.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8583
  • FPC developer.
Re: SQLite problem (only windows)
« Reply #3 on: July 11, 2011, 11:01:36 am »
Afaik if you delete an entry, you can't continue iterating over the dataset.

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #4 on: July 11, 2011, 01:26:40 pm »
I do not think this is the problem, because if I run the same code works on Linux Ubuntu, Windows is not. Also, if you look at the data after clicking the button you will notice that they are correct. But if I close the program and re-open I do not feel that I found all the data before closing the program and I want to see. It seems to me a bug.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #5 on: July 11, 2011, 05:27:33 pm »
No suggestions?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Lacak2

  • Guest
Re: SQLite problem (only windows)
« Reply #6 on: July 12, 2011, 09:42:46 am »
For me it works, row with 'pippo' is deleted and rows with 'ciao','carlo' and 'pollon remains'
Which version of FPC do you use ?

jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: SQLite problem (only windows)
« Reply #7 on: July 12, 2011, 10:19:00 am »
The row was deleted is Id1='1' and Id2='1'. There is no problem.

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #8 on: July 12, 2011, 10:36:28 am »
But the data will remain even if you close and reopen the program? Because until you run the code of the button and then close and reopen the program the problem does not occur. However, the data are:

Version #: 0.9.30
Data: 2011-03-08
Version FPC: 2.4.2
Revision SVN: 29749
i386-win32/win64
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Lacak2

  • Guest
Re: SQLite problem (only windows)
« Reply #9 on: July 12, 2011, 03:46:15 pm »
IMO it is bug in FPC 2.4.2, which is fixed now (FPC 2.4.4 and later).
See http://bugs.freepascal.org/view.php?id=16493

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #10 on: July 12, 2011, 03:54:37 pm »
Got it, thanks a lot.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2090
    • Lazarus and Free Pascal italian community
Re: SQLite problem (only windows)
« Reply #11 on: July 12, 2011, 04:29:42 pm »
IMO it is bug in FPC 2.4.2, which is fixed now (FPC 2.4.4 and later).
See http://bugs.freepascal.org/view.php?id=16493

Solved, Thanks a lot
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018