Recent

Author Topic: Component Questions  (Read 462 times)

emersonldc@gmail.com

  • New Member
  • *
  • Posts: 18
Component Questions
« on: July 06, 2020, 08:03:10 pm »
Hello! I'm new to Lazarus and I need help. I need a component that replaces the Delphi ClientDataSet communicating with the Query component and bringing the information to memory, where I can manipulate the records. I also need a good reporting component. Thank you!

jamie

  • Hero Member
  • *****
  • Posts: 3537
Re: Component Questions
« Reply #1 on: July 06, 2020, 08:28:52 pm »
Lazarus comes with examples.

They are located in the Lazarus folder under Examples/Samples

In those you will find multiple test apps for various items controls

 In any case you are looking for controls that are located on the Data Controls, Data Access and SQLdb tabs
If you already have some source code to go by you can then easily integrate it with laz
The only true wisdom is knowing you know nothing

emersonldc@gmail.com

  • New Member
  • *
  • Posts: 18
Re: Component Questions
« Reply #2 on: July 06, 2020, 08:38:27 pm »
I even managed to see the examples, but they have no connection with the ClientDataSet. Only in addition, I was able to connect to the database and display the information, but I need to work with ClientDataSet for the following reason.
My Delphi applications work as follows:
1 - Connects to the database.
2 - Execute and activate the query.
3 - Activate the clientdataset that is linked to the query.
4 - Disable the query.
5 - Disconnect from the database.
Doing these procedures, the data is stored in the clientdataset (memory) where I can manipulate the local information and only then send it to the server.

jamie

  • Hero Member
  • *****
  • Posts: 3537
Re: Component Questions
« Reply #3 on: July 06, 2020, 08:56:23 pm »
I don't think Laz has one exactly that name but if you look at the ACCESS tab you will see the
TBufDataset which is basically what you are talking about..

 Its a in memory dataset but It may only have some of the properties you are are looking for,  most likely enough to get you started.
The only true wisdom is knowing you know nothing

emersonldc@gmail.com

  • New Member
  • *
  • Posts: 18
Re: Component Questions
« Reply #4 on: July 06, 2020, 09:01:53 pm »
I found it and did tests, however, it doesn't connect to the query to load the data into memory. This is a big problem I'm having.

jamie

  • Hero Member
  • *****
  • Posts: 3537
Re: Component Questions
« Reply #5 on: July 06, 2020, 09:16:52 pm »
and what query component did you try ?

The components here are not fully loaded per component like it would be in Delphi, you need to place a few items on the form and connect them which is why I said it may not have all the properties..

 For Example the TSQLQuery will accept a DataSource which is accept the bufDataSet

of course with the SQLQuery you need to put in a Database component so you can then connect to the server.

 Its a trickle down effect.

 I am not a database coder because I dislike it very much but in the last few post I have given you it feels like I am becoming an expert in a very short time (Crash Corse)..
 Or the School of Underwood databases, use to be a punt but now it looks like it actually official …
The only true wisdom is knowing you know nothing

emersonldc@gmail.com

  • New Member
  • *
  • Posts: 18
Re: Component Questions
« Reply #6 on: July 06, 2020, 09:29:48 pm »
I am testing the components of zeoslib. In Delphi I do the following:
1 - Connection connected to the database
2 - Query connected to the connection
3 - DataSetProvider linked to the query
4 - ClientDataSet connected to the provider
5 - DataSource linked to clientdataset
When I need to search for a record I do the following:
1 - Connect to the database.
2 - Inform the SQL for the query and active object
3 - Activate the clientdataset
4 - Disable the query
5 - I disconnect the database.
With these procedures, I can have a desktop system that works with any database provider, even the slow ones in the market because I don't keep a constant connection.

jamie

  • Hero Member
  • *****
  • Posts: 3537
Re: Component Questions
« Reply #7 on: July 06, 2020, 09:35:29 pm »
Its in there, just keep at it, I need to go play some tennis now...

Enjoy..
The only true wisdom is knowing you know nothing

dsiders

  • Sr. Member
  • ****
  • Posts: 374
Re: Component Questions
« Reply #8 on: July 06, 2020, 09:40:43 pm »
I found it and did tests, however, it doesn't connect to the query to load the data into memory. This is a big problem I'm having.

TBufDataset.CopyFromDataset
Lazarus 2.1 (SVN) / FPC 3.0.4 / FPC 3.2.0 / x86-win64 / Windows 8.1

emersonldc@gmail.com

  • New Member
  • *
  • Posts: 18
Re: Component Questions
« Reply #9 on: July 06, 2020, 09:55:37 pm »
I still haven't found the solution.

 

TinyPortal © 2005-2018