asp problem in uploading to SQL 2005 db

M

Monica

I have a problem with uploading file into SQL 2005 DB using IIS 6.0
webserver, this code was working in SQL 2000 Db and IIS 5.0. Can you please
help me to see what the problem is.


Error msg :

Microsoft OLE DB Provider for ODBC Drivers error '80040e23'

[Microsoft][ODBC SQL Server Driver][SQL Server]The cursor does not include
the table being modified or the table is not updatable through the cursor.

/uploadnewrequest.asp, line 158


Code:
rstrNewFiles = ""
Set rstrNewFiles = Server.CreateObject("ADODB.Recordset")
rstrNewFiles.Open "tblrFiles", Conn, 3, 3
Set cmd = Server.CreateObject("ADODB.Command")
with cmd
.ActiveConnection = conn
.Parameters.Refresh
.CommandTimeout = 3600
End With


rstrNewFiles.AddNew
rstrNewFiles("ProjectNo") = strprojNumber
rstrNewFiles("projectID") = Uploader.Form("ProjNo")
rstrNewFiles("FileName") = File.FileName
rstrNewFiles("FileSize") = File.FileSize
rstrNewFiles("CreatedBy") = strUSer
rstrNewFiles("IPAddress") = varIPAddress
rstrNewFiles("DateCreated") = strDateCreated
If varFileExtension = "doc" then
rstrNewFiles("ContentType") = "application/msword"
Else
rstrNewFiles("ContentType") = File.ContentType
End if
rstrNewFiles("FileData").AppendChunk File.FileData
Line 158 - rstrNewFiles.Update
rstrNewFiles.Close
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,149
Members
46,695
Latest member
StanleyDri

Latest Threads

Top