I'm trying to modify this script from :
http://river.ktnet.co.kr/articles/2000032170531.htm
To make it save directly in SQL database, the field " Content " is Image
16
I get a " Incorrect syntax near '?'. " trying to execute my SQL
I'm a little lost here, help?
-chris
<%
Response.Buffer = TRUE
Response.Clear
byteCount = Request.TotalBytes
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
email = UploadRequest.Item("email").Item("Value")
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = UploadRequest.Item("blob").Item("FileName")
filename =
Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
picture = UploadRequest.Item("blob").Item("Value")
'Response.ContentType = contentType
'Response.binaryWrite picture
Response.Write contentType
Set CON = Server.CreateObject("ADODB.Connection")
CON.Mode = adModeReadWrite
CON.Open application("ConnectionString")
SQL = "INSERT INTO dbo.DOC_Document (Doc_Type,Content)
VALUES ('" & contentType & "', cast(" & picture & " as binary))"
response.Write SQL
con.execute(sql)
con.close
set con=nothing
%>
<!--#include file="upload.asp"-->
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]