Importing a lot of images from SQL database

CaCtus491

Joined: 2003-10-18
Posts: 19
Posted: Sat, 2003-10-18 15:33

I've got about 8000 images in about 200 albums stored in another web based system I wrote a while ago in ASP. Each image is stored a MS SQL database, along with a date, description and album id.
I'm looking to convert this over to Gallery. So far I've managed to write VB code that pulls the album data from the SQL server and creates a new album in Gallery, with the directory name corresponding to the old album ID. This was done using the Gallery Remote protocol with a bunch http transactions. So now I've got the album skeleton setup correctly in Gallery.
My problem is getting the images across. I was looking to use the same method as I used to get the albums across, but hit a brick wall when I couldn't work out how to get VB to perform a http request with an image attached. Alternatively I was considering pulling each image from the MS SQL database then saving it to the appropriate directory in Gallery, then getting Gallery to update albums with the files in each directory (easy to do as each directory lines up with the album ID in the SQL database). The problem with this is that I'd loose all the date and description information for individual images.

Any ideas or suggestions would be very much appreciated. Unfortunately I'm limited to VB / ASP.

Perhaps I could try and recreate the photos.dat in each album directory and save the images to it too, but I'm not too sure as to the format of that file and how to go about it.

Cheers,
Kent