Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-10

Hi

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dusan Halicky

I'm trying to create "lightweight xml dataset" derived from TDataSet. I've studied various other datasets (TFixedFormatDataset, TParadoxDataset, TMemDataSet) but it's too complicated, perhaps because there are no someone help me at least
with some info how it works? Is there any documentation on datasets?

Right now I'm trying to create some dataset which return static data (e.g. table of numbers from 1 to 100 in column1 and random strings in column2, some boolean in column3). I finally have something in the dbgrid but it acts weird, I have no idea how to handle data.

The reason I need my own dataset is that I am creating 3-tier application in lazarus. The key feature why I need proper dataset is that If I select too many data, e.g. 10k rows table, the dataset will fetch only few lines and then when user scroll the dbgrid new data will be fetched. As far as I know, this can be done only in TDataSet.

Every help appreciated.

Reply by email

Michael Van Canneyt
to Dusan Halicky
Dusan Halicky wrote 16 lines
I'm trying to create "lightweight xml dataset" derived from TDataSet. I've studied various other datasets (TFixedFormatDataset, TParadoxDataset, TMemDataSet) but it's too complicated, perhaps because there are no someone help me at least with some info how it works? Is there any documentation on datasets? Right now I'm trying to create some dataset which return static data (e.g. table of numbers from 1 to 100 in column1 and random strings in column2, some boolean in column3). I finally have something in the dbgrid but it acts weird, I have no idea how to handle data. The reason I need my own dataset is that I am creating 3-tier application in lazarus. The key feature why I need proper dataset is that If I select too many data, e.g. 10k rows table, the dataset will fetch only few lines and then when user scroll the dbgrid new data will be fetched. As far as I know, this can be done only in TDataSet.

There are some TXMLDataset implementations. The one on http://openfmi.net/projects/xmldataset
was developed for FPC.

Michael.

Reply by email

Joost van der Sluis
to Dusan Halicky: I'm trying to create "lightweight xml dataset" derived from TDataSet. I've studied…

Op vrijdag 10-10-2008 om 20:31 uur [tijdzone +0200], schreef Dusan Halicky:

Show quoted text 5 lines
I'm trying to create "lightweight xml dataset" derived from TDataSet. I've studied various other datasets (TFixedFormatDataset, TParadoxDataset, TMemDataSet) but it's too complicated, perhaps because there are no someone help me at least with some info how it works? Is there any documentation on datasets?

Yup, it ain't easy. But I think that TBufDataset is the best one to look at. What you could also do is use TBufDataset as parent for your dataset. That way you only have to implement a few methods.

Right now I'm trying to create some dataset which return static data (e.g. table of numbers from 1 to 100 in column1 and random strings in column2, some boolean in column3). I finally have something in the dbgrid but it acts weird, I have no idea how to handle data.

You probably need to implement RecNo, or bookmarks.

Show quoted text 5 lines
The reason I need my own dataset is that I am creating 3-tier application in lazarus. The key feature why I need proper dataset is that If I select too many data, e.g. 10k rows table, the dataset will fetch only few lines and then when user scroll the dbgrid new data will be fetched. As far as I know, this can be done only in TDataSet.

That's all implemented in TBufDataset. It you create a descendent of TBufDataset, you're done.

Joost.

Reply by email