[MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread Christian Nobel
Hi.

I have a little problem that bugs me.

Having a SQLite database with a varchar (that can have any size) with a
long text inside, I can read data as expected from the SQLite console.

But if I do like this:

var
  blabla:string;

DataSource1.DataSet.FieldByName('detail').AsWideString;

makes no difference from

DataSource1.DataSet.FieldByName('detail').AsString;

as the result in any case is that I only get a short string as result.

If I play a little around with the compiler directive {$H+}, I can get
the rest of the program ( the blabla string) to act as expected, namely
as a wide or short string, but it makes no difference to my dataset.

Any one having a suggestion what to do?

Tnx
Christian

___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread Martin Schreiber
On Wednesday 19 October 2011 11.10:16 Christian Nobel wrote:
 
 If I play a little around with the compiler directive {$H+}, I can get
 the rest of the program ( the blabla string) to act as expected, namely
 as a wide or short string, but it makes no difference to my dataset.
 
What is the maximal length which is returned?

 Any one having a suggestion what to do?

AFAIK the length of VARCHAR is limited in FCL, in MSEgui it can be any value. 
If the returned length is  255 then it is probably no shortstring/ansistring 
problem. Use Zeos memo fields or use the MSEgui database components.

Martin
___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread Christian Nobel
Den 19-10-2011 12:07, Martin Schreiber skrev:
 On Wednesday 19 October 2011 11.10:16 Christian Nobel wrote:

 If I play a little around with the compiler directive {$H+}, I can get
 the rest of the program ( the blabla string) to act as expected, namely
 as a wide or short string, but it makes no difference to my dataset.

 What is the maximal length which is returned?
 
 Any one having a suggestion what to do?
 
 AFAIK the length of VARCHAR is limited in FCL, in MSEgui it can be any value. 
 If the returned length is  255 then it is probably no shortstring/ansistring 
 problem. Use Zeos memo fields or use the MSEgui database components.
 
 Martin

Ahhh, bummer, found the problem.

Indirectly you gave me the answer.

There are no limitations in SQLite on the length of a Varchar, so by
using the SQLite manager, it is possible to fill the field with a long text.

But the problem appears to be the interpretation of the field by Zeos
(and probably other db libraries) as the field is truncated.

Changing the field to text instead of varchar changes the behaviour of
Zeos, as the field now is seen as a memo field.

Tnx
Christian

___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread Martin Schreiber
On Wednesday 19 October 2011 12.27:05 Christian Nobel wrote:
 
 Ahhh, bummer, found the problem.
 
 Indirectly you gave me the answer.
 
 There are no limitations in SQLite on the length of a Varchar, so by
 using the SQLite manager, it is possible to fill the field with a long
 text.
 
 But the problem appears to be the interpretation of the field by Zeos
 (and probably other db libraries) as the field is truncated.
 
 Changing the field to text instead of varchar changes the behaviour of
 Zeos, as the field now is seen as a memo field.
 
Or as suggested, use MSEgui DB components. They don't have a VARCHAR field 
length limitation. The performance of a memo field (=BLOB) is not so good. It 
is also possible to map SQlite text fields to VARCHAR(0) - unlimited string 
field.

Martin
___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread IvankoB for-mse
Really, the built-in MSEgui support of SQLite is brilliant :) Highly
recommended !


2011/10/19, Martin Schreiber mse00...@gmail.com:
 On Wednesday 19 October 2011 12.27:05 Christian Nobel wrote:

 Ahhh, bummer, found the problem.

 Indirectly you gave me the answer.

 There are no limitations in SQLite on the length of a Varchar, so by
 using the SQLite manager, it is possible to fill the field with a long
 text.

 But the problem appears to be the interpretation of the field by Zeos
 (and probably other db libraries) as the field is truncated.

 Changing the field to text instead of varchar changes the behaviour of
 Zeos, as the field now is seen as a memo field.

 Or as suggested, use MSEgui DB components. They don't have a VARCHAR field
 length limitation. The performance of a memo field (=BLOB) is not so good.
 It
 is also possible to map SQlite text fields to VARCHAR(0) - unlimited string
 field.

 Martin
 ___
 MSEide-MSEgui-talk mailing list
 MSEide-MSEgui-talk@lists.berlios.de
 https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk

___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk


Re: [MSEide-MSEgui-talk] Off topid: Zeos string length.

2011-10-19 Thread Christian Nobel
 Really, the built-in MSEgui support of SQLite is brilliant :) Highly
 recommended !

No doubt, but from my perspective I stay with Zeos.

Not judging whether one is better than the other, but simply as I also
do make Lazarus projects, therefore it is simpler to stick to only one
way to do it.

And if I make non ide applications, like web applications (powtils) I am
sorry to say, I prefer using Lazarus as editor, as I really find it
annoying not to have code completion.

___
MSEide-MSEgui-talk mailing list
MSEide-MSEgui-talk@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/mseide-msegui-talk