 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Brent Rose Guest
|
Posted: Sat Jul 26, 2003 1:58 am Post subject: Writing BLOB to cds field. |
|
|
I cannot see what is going wrong with this attempt to modify a BLOB field -
any hints/suggestions appreciated!!
Modifying or inserting a record leaves the BLOB field as null regardless...
The cdsPhotographPImage field correctly reports as IsBlob = True, CanModify
= True.
The following code reports that eg 30k was copied to the field, but the
field remains "IsNull = True" immediately following the CopyFrom...
cdsPhotograph.Edit;
FieldStream := cdsPhotograph.CreateBlobStream(cdsPhotographPImage, bmWrite);
x := FieldStream.CopyFrom(PhotoStream, PhotoStream.Size);
ShowMessage('Copied = ' + IntToStr(x));
if cdsPhotographPImage.IsNull then
ShowMessage('is null');
|
|
| Back to top |
|
 |
Brent Rose Guest
|
Posted: Sat Jul 26, 2003 3:19 am Post subject: Re: Writing BLOB to cds field. |
|
|
A case of looking in all the wrong places for a reason...
ANSWER: BLOB changes were posted immediately (as desired) - but one really
should wait till AFTER Free-ing the field BlobStream! It leads to some
bizarre behaviour otherwise....
Pardon me while I wipe the egg off my face... :-)
Brent Rose
[email]brentrose (AT) paradise (DOT) net.nz[/email]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|