Well, one thing stands out, the parameters dont match up:
@filename is a varbinary and you set it to a string (nvarchar instead maybe?)
@filelength is a bigint and you are passing it the docbuffer
I think you want something like this
Code:cmdUploadDoc.Parameters.Add("@Filename ", File1.PostedFile.FileName) cmdUploadDoc.Parameters.Add("@Filedata*fix*, Docbuffer) cmdUploadDoc.Parameters.Add("@FileLength", Docbuffer.Length) cmdUploadDoc.Parameters.Add("@FileType", File1.PostedFile.ContentType)




Reply With Quote