I am using ASP to extract information from a database on a remote server (SQL 7) and updating/inserting into a local database.
The last column is an image. I add the data now without the image column and now want to update the image column based on the rows I have added or changed.
Here is the code I have tried:
****(idList is a number list, ie 123456,654321,253614
oConn and oConn2 are the 2 server connections****
mySQL2 = "Select count(*) NUMBER from mlsvel where id in (" & idList & ") and medium_photo is not null"
set rsTemp1 = oConn2.Execute(mySQL2)
rsPCount = rsTemp1("NUMBER")
mySQL3 = "Select id, medium_photo from mlsvel where id in (" & idList & ") and medium_photo is not null"
set rsTemp2 = oConn2.Execute(mySQL3)
Do While Not rsTemp2.EOF
mySQL = "update mlsvel set medium_photo = " & rsTemp2("medium_photo").GetChunk(1024000) & " where id = " & trim(rsTemp2("id"))
How can I pull the images into a recordset and then update the local database from the recordset?