BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Writing BLOB to cds field.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
Brent Rose
Guest





PostPosted: Sat Jul 26, 2003 1:58 am    Post subject: Writing BLOB to cds field. Reply with quote



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





PostPosted: Sat Jul 26, 2003 3:19 am    Post subject: Re: Writing BLOB to cds field. Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.