I am trying to connect to mysql db through asp with code that is to upload a file from a computer. I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/uploadexmple.asp, line 47
I am using code that i got from
http://www.asp101.com/articles/jacob...load.asp, a program by jacob gilley to upload files with asp. Heres the bit thats giving me problems
ElseIf Uploader.Form("saveto") = "database" Then
' Open the table you are saving the file to
dim rs
Set RS = Server.CreateObject("ADODB.Recordset")
RS.open "select * from lecnotes", "Driver={Mysql}; Server=mysql1.webhost.ie; Database=paulmc; UID=paul; PWD=1881 ",2,2
RS.AddNew ' create a new record
RS("filename") = file.filename
RS("filesize")= File.FileSize
RS("contenttype") = File.ContentType
' Save the file to the database
File.SaveToDatabase RS("filedata")
' Commit the changes and close
RS.Update
RS.Close
End If
lecnotes is the name of the table where i'll store the file and it has properties:
Field Type Attributes Null Default Extra Action
filename varchar(20)
filesize varchar(20)
contenttype varchar(40)
filedata blob BINARY
any help appreciated...thanks