tonelm54
asked on
Update Partial Blob
Good afternoon,
Ok this is a strange one, and before anyone states it I know it isnt realy best practise to store files in databases, but it makes life soo much easier for this issue, belive me.
Is it possible to copy a record with a blob filed, and then update part of the second blob.
The idea is to hold a file in the database, copy that file, and instead of transfering the entire files again, only update the parts of the file that has changed. So once the transaction has completed the second file can be downlaoded in it entirity and the file will be complete.
I hope Ive explained it ok, I know its a very weird question, but I need to solve this problem, and this is the best idea I have soo far.
Thank you
Ok this is a strange one, and before anyone states it I know it isnt realy best practise to store files in databases, but it makes life soo much easier for this issue, belive me.
Is it possible to copy a record with a blob filed, and then update part of the second blob.
The idea is to hold a file in the database, copy that file, and instead of transfering the entire files again, only update the parts of the file that has changed. So once the transaction has completed the second file can be downlaoded in it entirity and the file will be complete.
I hope Ive explained it ok, I know its a very weird question, but I need to solve this problem, and this is the best idea I have soo far.
Thank you
insert into files(`myblob`) VALUES (Select `myBlob` from `myTable` where `blobID`=27);
update `myTable` SET `mybob` = mid(`myBlob`,27,5,'myNEWDATA') where `blobID`=27;
So 27 is the start of the blob that needs updating, 5 is the length of the update, and myNEWDATA is the newData from the new file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.