MySQL Forums
Forum List  »  Newbie

Re: Bulk Photo Image Loading in MySQL (SOLVED)
Posted by: Patrick Castillo
Date: June 05, 2017 02:30PM

Hi,

With a little more research and testing I was able to solve the issue.
Here is how I did it:

1. Exported the data from SQL Server like so:
- Wrote script to Create Directories and Format File for Image Processing
Script does these:
- uses the bcp command to create format file
- uses a batch file I wrote to fix the corruption in the format file (BCP likes to add an extra 8 bytes to the file by default)
- Uses the bcp command to output the images by file(named by ID number)

2. Wrote a small program in C# to read the files and update the Persons photo
using the file name (which is the ID number).

Like I said before...the table I store the images is small so there is no big overhead. This might not be a solution for all scenarios but if anyone wants the source codes for reference, feel free to reply to this post and I'll be glad to send.

Regards,
Patrick

Options: ReplyQuote


Subject
Written By
Posted
Re: Bulk Photo Image Loading in MySQL (SOLVED)
June 05, 2017 02:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.