Sign in Join

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

Mailing lists / fpc-pascal / 2014-01

Does TBufDataSet support Blob or memo field?

7 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Dennis Poon

I created a TMemoField in TBufDataSet but no matter I do:

1) Field.asString := 'some value'
or
2) Field.LoadFromStream(someStream).

Afterwards, this F.AsString always returns ''
and
F.LoadFromStream(someStream) always has a 0 BlobSize afterwards.

Anyone has similar experience?

Dennis

LacaK
to Dennis Poon

AFAIR this is so. (we can call it bug ;-))
Data are not there until you Post record.
After Post you will see data there, right?
-Laco.

Show quoted text 17 lines
I created a TMemoField in TBufDataSet but no matter I do: 1) Field.asString := 'some value' or 2) Field.LoadFromStream(someStream). Afterwards, this F.AsString always returns '' and F.LoadFromStream(someStream) always has a 0 BlobSize afterwards. Anyone has similar experience? Dennis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Dennis Poon
to LacaK

All the other usual types (e.g. integer, string, datetime) work except ftMemo and ftblob.

Yes, I have used POST

Dennis

LacaK wrote 5 lines
AFAIR this is so. (we can call it bug ;-)) Data are not there until you Post record. After Post you will see data there, right? -Laco.
Dennis Poon
to Dennis Poon: All the other usual types (e.g. integer, string, datetime) work except ftMemo and ftblob.…
Dennis Poon wrote 15 lines
All the other usual types (e.g. integer, string, datetime) work except ftMemo and ftblob. Yes, I have used POST Dennis LacaK wrote: > AFAIR this is so. (we can call it bug ;-)) > Data are not there until you Post record. > After Post you will see data there, right? > -Laco. >

LacaK,
My apology. You were right, values of blob/memo field of TbufDataset won't get updated after TDataset.POST
while other types have no such problem.

I checked my code again and I found I did post after I check the blob/memo field values.

I think it is probably a bug, rather than a feature as all fields should be the same: values get updated even without calling post.

Dennis

LacaK
to Dennis Poon
Show quoted text 5 lines
I checked my code again and I found I did post after I check the blob/memo field values. I think it is probably a bug, rather than a feature as all fields should be the same: values get updated even without calling post.

Yes, I agree.
As I wrote I will look at it ... if I find smart solution I will fix it ... In all cases I will reply in this thread ...
L.

LacaK
to LacaK
Show quoted text 10 lines
> I checked my code again and I found I did post after I check the > blob/memo field values. > > I think it is probably a bug, rather than a feature as all fields > should be the same: values get updated even without calling post. Yes, I agree. As I wrote I will look at it ... if I find smart solution I will fix it ... In all cases I will reply in this thread ...

I just post patch in rev.26604 (trunk), which should fix this bug If you can test it I will be happy.
It is a bit experimental patch, so there may be side effects (on other side all tests pass ok)
-Laco.