Recent

Author Topic: sqlite3dataset and PK on 2 columns  (Read 3454 times)

GuidoCavalera

  • New Member
  • *
  • Posts: 18
sqlite3dataset and PK on 2 columns
« on: September 25, 2013, 10:35:25 am »
hi,

sqlite3dataset work fine if i define 2 fields as PK ? or it want only one field ?

I ve a table with PK on 2 column but applyupdates don't save records, if i use only one field yes ?

It's correctly ?

BYE

GuidoCavalera

  • New Member
  • *
  • Posts: 18
Re: sqlite3dataset and PK on 2 columns
« Reply #1 on: September 25, 2013, 10:37:12 am »
'if i use only one field yes ?'

without ?  :)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: sqlite3dataset and PK on 2 columns
« Reply #2 on: September 25, 2013, 10:39:42 am »
Well, if SQLite supports multicolumn PKs then Lazarus/FPC should be able to deal with it.

Please include a sample application or at least your table SQL, Lazarus version, operating system. See the first link in my signature.

Preferably a sample application that demonstrates the problem (project/publish project, zip up the result and attach it to a post).

Thanks.
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

GuidoCavalera

  • New Member
  • *
  • Posts: 18
Re: sqlite3dataset and PK on 2 columns
« Reply #3 on: September 25, 2013, 04:12:47 pm »
i just upgrade to last lazarus 1.1 and fpc 2.7.1. Before this version all go fine in fact in my application data applying on table with 2 PKs.

Early i post u a sample, my application is too complex. :)

Bye

LacaK

  • Hero Member
  • *****
  • Posts: 702
Re: sqlite3dataset and PK on 2 columns
« Reply #4 on: September 26, 2013, 09:22:11 am »
If you are speaking about "sqlite3dataset" , so not sqlDB TSQLQuery + TSQLite3Connection, then looking at sources it seems, that there is supported only single column primary key.
(look at usage of FPrimaryKeyNo in unit CustomSqliteDS)

 

TinyPortal © 2005-2018