Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-03-02 Thread LacaK
One way is: TField.Size := (TFieldDef.Size div 2) if it's a WideString, and div 4 if unicode is enabled. Or the TDataset descendant has to correct the value for WideStrings when creating fields. (How?) Very simple/primitive Idea No1: add property DataSize: integer read GetDataSize write

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread Martin Schreiber
On Thursday 24 February 2011 08:02:20 LacaK wrote: So also here we can see, that FieldDef.Size is expected to be number of characters not bytes. So IMHO logical conclusion will be say, that TFieldDef.Size for string fields has same menaing as Field.Size, so it is number of characters (so

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread michael . vancanneyt
On Thu, 24 Feb 2011, LacaK wrote: Hi, I am writting here to discuss bug http://bugs.freepascal.org/view.php?id=17268 (I do not want reopen bug and writte there because I am not sure about my arguments) IMHO root of problem is in different definition of TFieldDef.Size and TField.Size

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread michael . vancanneyt
On Thu, 24 Feb 2011, Martin Schreiber wrote: On Thursday 24 February 2011 08:02:20 LacaK wrote: So also here we can see, that FieldDef.Size is expected to be number of characters not bytes. So IMHO logical conclusion will be say, that TFieldDef.Size for string fields has same menaing as

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread Martin Schreiber
On Thursday 24 February 2011 09:49:51 michael.vancann...@wisa.be wrote: Agreed. In MSEgui tmsestringfield.size is the maximum allowed character count for the field. 0 = no limit. tmsebufdataset stores string data as UnicodeString instead to use a fixed record layout. But here you

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread michael . vancanneyt
On Thu, 24 Feb 2011, Martin Schreiber wrote: On Thursday 24 February 2011 09:49:51 michael.vancann...@wisa.be wrote: Agreed. In MSEgui tmsestringfield.size is the maximum allowed character count for the field. 0 = no limit. tmsebufdataset stores string data as UnicodeString instead to use a

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread Martin Schreiber
On Thursday 24 February 2011 10:16:43 michael.vancann...@wisa.be wrote: But here you implicitly assume that you have a fixed number of bytes per character. You should always be explicit about such things, since this is a non-trivial assumption. I don't understand. tmsebufdataset

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread LacaK
Hi, I am writting here to discuss bug http://bugs.freepascal.org/view.php?id=17268 (I do not want reopen bug and writte there because I am not sure about my arguments) IMHO root of problem is in different definition of TFieldDef.Size and TField.Size Documentation says, that 1.

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread michael . vancanneyt
On Thu, 24 Feb 2011, Martin Schreiber wrote: On Thursday 24 February 2011 10:16:43 michael.vancann...@wisa.be wrote: But here you implicitly assume that you have a fixed number of bytes per character. You should always be explicit about such things, since this is a non-trivial assumption.

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread LacaK
Please, be patient. I'm working on it, as you can see in the bug reports and commits. ok, of course I did not know your plans, ideas, thoughts etc. As I said earlier, widestringfields aren't available in fpc yet. Someone wrote some code for it, but it is never properly tested and probably

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread Joost van der Sluis
On Thu, 2011-02-24 at 12:59 +0100, LacaK wrote: if you can inform about your plans, order of tasks etc. ... it will be welcomed The order.. well, that's difficult.. What comes first, comes first. :) if I can help you, let me know ... for example I have fix for TODBCConnection.SetParameters

Re: [fpc-devel] TFieldDef.Size vs TField.Size

2011-02-24 Thread LacaK
I'm adding some ftTime tests. Did you noticed, that I already posted such tests http://bugs.freepascal.org/view.php?id=18763 ? Then let me know, I send you fix for ftTime for TODBCConnection ... but depends on http://bugs.freepascal.org/view.php?id=18773 All widestring-issues are

[fpc-devel] TFieldDef.Size vs TField.Size

2011-02-23 Thread LacaK
Hi, I am writting here to discuss bug http://bugs.freepascal.org/view.php?id=17268 (I do not want reopen bug and writte there because I am not sure about my arguments) IMHO root of problem is in different definition of TFieldDef.Size and TField.Size Documentation says, that 1.