Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

'nstead save to file, how can I save it into a traditional .mdb?

$
0
0
'In traditional ASP:
Dim fileStream
Set fileStream = Server.CreateObject("ADODB.Stream")
'......Got fileStream of a file from user's computer and then successfully pasted it into server:
fileStream.SaveToFile Server.MapPath("./uploadFolder/xxxx.jpg"), 2

'Instead save to file, how can I save it into a traditional .mdb?
'I tried to insert it into a OLE fileld [Image/Zip] without succsedd:
strSQL = "Insert Into Table1([FileName],[Image/Zip]) " & "Values('" & fileName & "'," & fileStream.Read & ")"
'or: strSQL = "Insert Into Table1([FileName],[Image/Zip]) " & "Values('" & fileName & "'," & fileStream & ")"
objConnection.Execute(strSQL)

I will be very appreciated for any hint!

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>