Read the database picture

xiaoxiao2021-03-06  30

<%

SET RS = conn.execute ("SELECT * from Youtable")

Set ofilestream = CreateObject ("AdoDb.Stream")

OfileStream.Type = 1

Set id = rs ("id")

SETO = RS ("photo")

Do while rs.eof = false

OfileStream.open

OfileStream.write photo.value

OfileStream.savetofile "D: / Photo" & id & ". JPG", 2

OfileStream.close

rs.movenext

loop

Set ofilestream = Nothing

SET Photo = Nothing

Set id = Nothing

Rs.close

SET RS = Nothing

Call CloseDatabase ()

%>

转载请注明原文地址:https://www.9cbs.com/read-83444.html

New Post(0)