Recent

Author Topic: SQLite3 Beginner's difficulty  (Read 1137 times)

Neville

  • New Member
  • *
  • Posts: 41
SQLite3 Beginner's difficulty
« on: February 07, 2023, 05:23:24 pm »
I have a small SQLite3 database which I can link to from a test program in Lazarus.

It has all the things I think it should have: Connection, Transaction, Query, DataSource, DBGrid.

When I select data through the Query component, I get the right number of rows and columns in the DBGrid, but every cell contains just the item "(MEMO)"

There must be something (very simple) that I'm missing.

Can anyone help?

Thanks

Nicole

  • Hero Member
  • *****
  • Posts: 970
Re: SQLite3 Beginner's difficulty
« Reply #1 on: February 07, 2023, 06:06:22 pm »
This is hard to guess.
Help yourself by Showmessage() to grab at which position the values disappear.

You may also want to check, if the "edit" of the query and the "edit" of the DBGrid's rows from the IDE interface show strange things.

af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: SQLite3 Beginner's difficulty
« Reply #2 on: February 07, 2023, 06:20:45 pm »
A ) Search for sqlite and Memo in the forum search

B ) Look at you question here https://forum.lazarus.freepascal.org/index.php/topic,61697.msg464896.html#msg464896
regards
Andreas

Neville

  • New Member
  • *
  • Posts: 41
Re: SQLite3 Beginner's difficulty
« Reply #3 on: February 07, 2023, 10:32:18 pm »
Thank you.  It works fine now.

It's amazing how easy it is to forget things at 77.  Have you found that?


af0815

  • Hero Member
  • *****
  • Posts: 1289
Re: SQLite3 Beginner's difficulty
« Reply #4 on: February 08, 2023, 07:33:33 am »
I use external storage :-) A forum search, a google search (type lazarus or fpc as first word, in front of your question) and i have a lot of code snippets on my pc

After hanging on a life-support-machine, i know how fast it is to forget things. And this is the reason to work with "external storage" and use the search.
regards
Andreas

Zvoni

  • Hero Member
  • *****
  • Posts: 2319
Re: SQLite3 Beginner's difficulty
« Reply #5 on: February 08, 2023, 08:37:11 am »

There must be something (very simple) that I'm missing.

Thanks
Code: SQL  [Select][+][-]
  1. SELECT CHAR(SomeTextColumn) AS Field1 FROM SomeTable
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018