Blob Streams and Blob failures
Posted: 13.04.2011, 07:51
Ladies and Gents,
Im having a real pain in the a** time trying to get a dataset to upload a blob.
SQL SERVER EXPRESS 2005 (win2k environment in a virtual machine)
This is the code:
[font=Courier New]
if not Locate('FIELDNAME', FRef, [loCaseInsensitive]) then
begin
Insert;
vS := tblGetPhoto.CreateBlobStream(GetPhotoIMAGE_DATA, bmWrite);
try
vS.Seek(0, soBeginning);
vS.CopyFrom(vUpload, vUpload.Size);
finally
FreeAndNil(vS);
end;
Post;
end;
[/font]
Now this same process and other types, works on other tables except this new table im working on.
Another image is uploaded to a separate table with no problems prior to this code executing, BUT when it comes time to upload the second image to the next table, it just skips over it as if there was nothing there (Yes there is image data in the stream).
Other fields in the table work fine except the varbinary field im trying to upload an image to in this table.
Any ideas why this would not be uploading to the blob field? Its just setting it to null.
No errors are raised either.
Im having a real pain in the a** time trying to get a dataset to upload a blob.
SQL SERVER EXPRESS 2005 (win2k environment in a virtual machine)
This is the code:
[font=Courier New]
if not Locate('FIELDNAME', FRef, [loCaseInsensitive]) then
begin
Insert;
vS := tblGetPhoto.CreateBlobStream(GetPhotoIMAGE_DATA, bmWrite);
try
vS.Seek(0, soBeginning);
vS.CopyFrom(vUpload, vUpload.Size);
finally
FreeAndNil(vS);
end;
Post;
end;
[/font]
Now this same process and other types, works on other tables except this new table im working on.
Another image is uploaded to a separate table with no problems prior to this code executing, BUT when it comes time to upload the second image to the next table, it just skips over it as if there was nothing there (Yes there is image data in the stream).
Other fields in the table work fine except the varbinary field im trying to upload an image to in this table.
Any ideas why this would not be uploading to the blob field? Its just setting it to null.
No errors are raised either.