Sign in Join

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

Mailing lists / lazarus / 2008-02

some FCL bugs

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Denis Golovan

Hi, all.

At the time of PocketPC programming using Lazarus, I found some bugs/features :). I'd like to discuss them before posting to bugtracker.

TMemDataset
1. When using TMemDataset and compiling for ARM processor bus errors (misaligned data) appear here and there. Now I solved the problem by inserting packed directive in TMTRecInfo record. Such as:

   TMTRecInfo = packed record
    ...
   end;

Maybe some knows better solution?
2. Defining fields in TMemdataset using FieldDefs and trying to open dataset results in segfault. CreateTable must be called before. Correct me if I'm wrong, but TDataset ideology says dataset must create fields on open.

TSqlite3Dataset. Many thanks to the author. Really. He did a good job. However some inconsistencies left:
3. When using calculated fields in select query, field receive string(8194) datatype. Typeinfo on field gives correct type. For example, integer.
4. Qualified field names in queries (those starting with table name and dot) and those which contain [ and ] symbols result uncleaned field names in dataset. For example:
select [tt].[res] from [tt]
...gives "[tt].[res]" dataset field instead of "res".

P.S. Lazarus SVN, FPC svn

Best regards, Denis Golovan aka MageSlayer

Reply by email

Luiz Americo Pereira Camara
to Denis Golovan
Denis Golovan wrote
TSqlite3Dataset. Many thanks to the author. Really. He did a good job.

Thanks.

However some inconsistencies left: 3. When using calculated fields in select query, field receive string(8194) datatype. Typeinfo on field gives correct type. For example, integer.

Can you give me an example?

Show quoted text 5 lines
4. Qualified field names in queries (those starting with table name and dot) and those which contain [ and ] symbols result uncleaned field names in dataset. For example: select [tt].[res] from [tt] ...gives "[tt].[res]" dataset field instead of "res".

I'll take a look.

BTW: It works in PocketPC?

Luiz

Reply by email

Joost van der Sluis
to Denis Golovan: Hi, all. At the time of PocketPC programming using Lazarus, I found some bugs/features :).

Op woensdag 27-02-2008 om 20:05 uur [tijdzone +0200], schreef Denis Golovan:

Show quoted text 12 lines
Hi, all. At the time of PocketPC programming using Lazarus, I found some bugs/features :). I'd like to discuss them before posting to bugtracker. TMemDataset 1. When using TMemDataset and compiling for ARM processor bus errors (misaligned data) appear here and there. Now I solved the problem by inserting packed directive in TMTRecInfo record. Such as: TMTRecInfo = packed record ... end;

Well, TMemDataset is officially 'maintained' but in practice it didn't had any updates for years. The main idea is to let TBufdataset replace TMemDataset. But as long that is not possible... maybe I should have a I've never cared about alignment in the db-units. More an more people are using it on ARM-based machines, though. And I recieve more and more reports about problems. So I'll have to look into the alignment-issues.

Maybe some knows better solution? 2. Defining fields in TMemdataset using FieldDefs and trying to open dataset results in segfault. CreateTable must be called before. Correct me if I'm wrong, but TDataset ideology says dataset must create fields on open.

Yes, it should. But only if the 'dataset' already exists. This is clearly never the case with a TMemDataset. (Unless you read it from disk, for example)

So I'm not sure what to do here.

Joost.

Reply by email