Copy a blob from one table to another inside a stored procedure
Posted on 2008-10-31
I'm running Firebird 2.1.1 & my applicaton written in .net 2.0
I've become unstuck when trying to write a stored procedure to copy some blob data (a tiff image) from one table to another. For example:
Table 1 contains a field called ImageScan , Type blob , Size 80, Subtype Binary
and row 4 of this contains my image
Table 2 contains a field called FiledScan , Type blob , Size 80 Subtype Binary
and row 6 is where I want the image to be copied to
I dont want to copy the image to the client and have the client reinsert the blob into the new table due to network overhead.
The SP would start with something like this:
Create Procedure CopyBlob (OldImageNumber integer, NewImageNumber integer)
where oldimage is the row number of the existing image and NewImageNumber is the row number of the new image.
Thanks in advance Jon