James Stone
asked on
Move a MSSQL blob field to a MySQL blob field
I have an existing MSSQL blob field that I would like to "export" to a MySQL database. I have a script that will display the existing blob field, but I am guessing that I need to "save" the image and then "import" them into the MySQL database.
I tried to use the display script to just insert, but I get a "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2".
If I remove the blob fields from the insert(`STI_Image`&`STI_La rge_Image` ), it inserts the rest of the information into the table.
Any help would be appreciated.
InsertBlob.php
DisplayImages.php
I tried to use the display script to just insert, but I get a "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2".
If I remove the blob fields from the insert(`STI_Image`&`STI_La
Any help would be appreciated.
InsertBlob.php
DisplayImages.php
ASKER
Sorry I guess I worded what I am looking for wrong -- I am trying to do this with PHP. I have an android device that has php/MySql (runs as localhost) that I use as a warehouse scanner. I am wanting to upload the MSSQL database info (filtered to specific items from a php form) into the android device. The android device can hook to the internet to download, but then the device goes to the warehouse with no outside connection. If I can get the MS info into a sql file using php, I could use php to read that file.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi!
Did you manage to solve this ?
Regards,
Tomas Helgi
Did you manage to solve this ?
Regards,
Tomas Helgi
ASKER
Sorry I ended up just exporting the files to a folder and saving the link in the database. Thanks for your help.
Hi!
Please close this question as you see appropriate.
Regards,
Tomas Helgi
Please close this question as you see appropriate.
Regards,
Tomas Helgi
In SQLServer Management Studio you could choose to export the data to file either as a CSV file or with INSERT statements and easily convert that insert statement to valid MySQL statements that you import with
Open in new window
or if you choose CSV formatthen in the mysql console
Open in new window
Regards,
Tomas Helgi