Recent

Author Topic: error in sqlite database (not edit)  (Read 878 times)

soymoe

  • New member
  • *
  • Posts: 17
error in sqlite database (not edit)
« on: January 04, 2019, 11:31:59 pm »
hi, I am creating a database application with sqlite and the fields appear with the text "memo" and I can not edit it, what will be the reason?
http://subirimagen.me/uploads/20190104163129.png

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: error in sqlite database (not edit)
« Reply #1 on: January 05, 2019, 12:24:57 am »
hello,
if you want to edit a memo , you can use a TDbmemo component : see the field Notes in my database example coming with lazarus  : Deadly Mushrooms.

Friendly, J.P
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

soymoe

  • New member
  • *
  • Posts: 17
Re: error in sqlite database (not edit)
« Reply #2 on: January 05, 2019, 02:25:53 am »
Thanks for replying, the fields I want to edit are first and last name, which are of the text type, not memo

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 753
Re: error in sqlite database (not edit)
« Reply #3 on: January 05, 2019, 09:08:21 am »
hello,
you must use the varchar type for simple text , the text type is for memo.
Example for my deadly mushrooms database :
Code: SQL  [Select]
  1. BEGIN TRANSACTION;
  2. CREATE TABLE `DeadlyMushrooms`
  3. -- This table created by Jurassic Pork
  4. -- for Free Pascal Lazarus
  5. -- Create date:2013-08-05 23:55:09
  6. (
  7.        ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  8.        Scientific_Name VARCHAR NOT NULL,
  9.        Common_Name VARCHAR
  10. , `Order`  VARCHAR, `Genus`  VARCHAR, `Notes`  TEXT, `Picture`  BLOB, `Image_Link`  VARCHAR);

friendly, J.P
« Last Edit: January 05, 2019, 09:10:21 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko