Hello, I've gotten close but I still keep getting the following error.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Invalid string or buffer length
/faculty/submit/update/addpicproc.asp, line 55
Here is the code for that:
Response.Buffer = True
Dim load
Set load = new Loader
load.initialize
Dim fileData
fileData = load.getFileData("PicFile")
Dim fileName
fileName = LCase(load.getFileName("PicFile"))
Dim filePath
filePath = load.getFilePath("PicFile")
Dim filePathComplete
filePathComplete = load.getFilePathComplete("PicFile")
Dim fileSize
fileSize = load.getFileSize("PicFile")
Dim fileSizeTranslated
fileSizeTranslated = load.getFileSizeTranslated("PicFile")
Dim contentType
contentType = load.getContentType("PicFile")
Dim countElements
countElements = load.Count
Dim idInput
idInput = load.getValue("FacultyID")
Set load = Nothing
Dim Conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn=("server=localhost;db=aviation;driver=MySQL ODBC 3.51 Driver;uid= ;pwd=")
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "Facultypics", Conn, 2, 2
rs.AddNew
rs("FileName") = fileName
rs("FileSize") = fileSize
rs("FileData").Appendchunk fileData
rs("ContentType") = contentType
rs("FacultyID") = idinput
rs.Update
rs.Close
Set rs = Nothing
Conn.Close
If Err.number = 0 Then
Response.Redirect "faculty/submit/update/index.asp?FacultyID="&idinput&"&Birth="&Request("Birth")
Else
Response.Write "Could not insert into Database. Errors occured ...<br>"
End If