Recent

Author Topic: KOL-CE and sqlite  (Read 6536 times)

cunhajr

  • New Member
  • *
  • Posts: 38
KOL-CE and sqlite
« on: December 21, 2009, 05:09:17 pm »

   I saw that KOL-CE is a good option, but can someone show me how to use sqlite with KOL-CE?  Is there a sample ?



Thanks,

CunhaJr.

cunhajr

  • New Member
  • *
  • Posts: 38
Re: KOL-CE and sqlite
« Reply #1 on: December 21, 2009, 09:19:55 pm »
I think this is the way to do... can't use any visual components but can call them on the fly, just need to add to the uses clauses sqlite3ds

Code: [Select]
procedure TForm1.FormCreate(Sender: TObject);
var
 sqlPoa: TSqlite3Dataset;
begin

sqlPoa := TSqlite3Dataset.Create(KOLForm1);

sqlPOA.FileName    := UTF8Encode((ExtractFilePath(ParamStr(0))+'Inventario.sqlite'));
sqlPOA.SQL         := 'Select * from POA';
sqlPOA.TableName   :='POA';
sqlPOA.open;


while not sqlPOa.EOF do begin

  ComboBox1.Add(sqlPOa.fieldbyname('nr_poa').asstring );
  sqlPOa.next;
end;

end;


 But I miss a grid component at KOL pallet... so I have a question to the people who uses KOL-CE, I need something to show the rows like a grid...  how can I show them like in a grid ?

Thanks






cunhajr

  • New Member
  • *
  • Posts: 38
Re: KOL-CE and sqlite
« Reply #2 on: December 23, 2009, 02:00:31 pm »

  Just after reinstall my lazarus and use the stable release.. now I am able to cross compile win32 and wince.. it is nice to see this working.

  I am thinking about that it is better use KOL-CE instead of the LCL.

  But I need to show the records, like in a grid. Is it possible to do that using KOL?

which kol component does it? I will appreciate some sample code.

Thanks again,

Cunhajr,

 

TinyPortal © 2005-2018