Hey guys, I get this error when I try to add a new file record to my database.I'm working with SQL server 2000.
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
The line giving this problem is below:
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open "Files", "DSN=MyDSN;UID=sa;PWD=pass", 2, 2
RS.AddNew ' create a new record
RS("FileName") = File.FileName <------ Problem
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