I am having a problem trying to saving some pictures that are stored in an MS Access database to files individually using vbscript can anyone help me on how I can achieve this.
My Code
The problem I am having is that the picture is not showing in the file and even thou it has the picture file size.DB_Conn.open(DB_ConnStng)
if DB_Conn.State = adStateOpen then
oRecordset.Open sSQL, DB_Conn, adOpenForwardOnly, adLockReadOnly
if oRecordset.State = adStateOpen then
count = 0
Do While Not oRecordset.EOF
oFileStream.Open
count = count + 1
oFileStream.Write oRecordset.Fields(strFieldName).Value
strImagePath = strFolderPath & "\Image" & CStr(count) & ".bmp"
oFileStream.SaveToFile strImagePath, adSaveCreateOverWrite
oRecordset.MoveNext
oFileStream.Close
Loop
oRecordset.Close
end if
end if
FYI: The field type is OLE Object.