I'm trying to store an image in a database (no lectures please, I know the
arguments about doing this) but I can't seem to get it to work. I don't
get an error but the binary isn't getting stored.

Thanks
-----------
dim tempImg
dim stm
set stm = Server.CreateObject("ADODB.Stream")
stm.Type = adTypeBinary

dim rs
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "imgTable", DSN, 3, 3

stm.Open
tempImg = stm.LoadFromFile(Server.MapPath("some.gif"))

rs.AddNew "image", tempImg

rs.Close
set rs = Nothing
stm.Close
set stm = Nothing

---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to