I posted a question on the PHP section of this forum but, maybe this is the better place to ask... Does anyone have php code for moving an image - blob field that already exists within one Microsoft Sql Server 2005 database (e.g. external) to a local shared Microsoft Sql Server 2005 database? I am able to move all the other fields of the database except the image field. HELP PLEASE!!!
I haven't done it with PHP, but blob is just binary data. Maybe the problem is you are trying to move too much data for the PHP defaults. You might be able to adjust the defaults in the connection string. If this is a onetime move it would be easyer to do with enterprise manager. (MS SQL Server's)
This is not a one time move. This process would need to run daily. Also, I don't receive an error related to beyond the data size limits.
Well, your not getting any help with the PHP, ( and I can't help much there). But here is another option. Create a job on SQL Server and have it run at the required intervals moving the data over. You can also use replication and push the data to the remote server (or pull). I believe you could also create a stored procedure in SQL server and then call the procedure when ever you want from PHP.
Alas, thanks to others on the web forums I have the answer! Converting the data connection to Adodb and converting with the following function, I have been able to sql insert the data from the external MS Sql Server to the local MS Sql Server. Thanks to all who assisted in any manner. function storeimage($fldimage) { // Handling IMAGE - BLOB fields $imgdata = unpack("H*hex", $fldimage); $imgdataresult = "0x".$imgdata['hex']; return $imgdataresult; } // END function storeimage($fldimage) {