Re: ASP Problem on uploading file into SQL 2005 DB
Re: ASP Problem on uploading file into SQL 2005 DB
am 14.04.2006 11:52:29 von cinzia
"Monica" ha scritto nel messaggio
news:uUYRJagXGHA.752@TK2MSFTNGP02.phx.gbl...
> 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
>
Hi Monica,
I had a similar problem.
The problem in my case, was generated by different release od ADO installed
on the server running the application.
To work fine with SQL Server 2005 you need MDAC 2.8, but if in your system
you have also MDAC 2.6, 2.1 ecc...
could be IIS don't use the last version ... so if you can, try to remove
the old version of mdac.
--
Cinzia
---------------------------------------
| http://www.riolab.org |
--------------------------------------->
Re: ASP Problem on uploading file into SQL 2005 DB
am 15.04.2006 20:17:28 von sdfadsf
Hi Cinzia
How do you do that? How can I uninstall lower version of MDAC?
Monica
"Cinzia" wrote in message
news:OCouHh6XGHA.3444@TK2MSFTNGP05.phx.gbl...
>
>
> "Monica" ha scritto nel messaggio
> news:uUYRJagXGHA.752@TK2MSFTNGP02.phx.gbl...
>> 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
>>
>
> Hi Monica,
> I had a similar problem.
> The problem in my case, was generated by different release od ADO
> installed
> on the server running the application.
> To work fine with SQL Server 2005 you need MDAC 2.8, but if in your
> system
> you have also MDAC 2.6, 2.1 ecc...
> could be IIS don't use the last version ... so if you can, try to
> remove
> the old version of mdac.
>
>
> --
> Cinzia
> ---------------------------------------
> | http://www.riolab.org |
> --------------------------------------->
>
>
Re: ASP Problem on uploading file into SQL 2005 DB
am 17.04.2006 21:02:31 von cinzia
"news.microsoft.com" ha scritto nel messaggio
news:%23Nr2KjLYGHA.3936@TK2MSFTNGP05.phx.gbl...
> Hi Cinzia
>
> How do you do that? How can I uninstall lower version of MDAC?
>
> Monica
>
> "Cinzia" wrote in message
> news:OCouHh6XGHA.3444@TK2MSFTNGP05.phx.gbl...
> >
> >
> > "Monica" ha scritto nel messaggio
> > news:uUYRJagXGHA.752@TK2MSFTNGP02.phx.gbl...
> >> 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
> >>
> >
> > Hi Monica,
> > I had a similar problem.
> > The problem in my case, was generated by different release od ADO
> > installed
> > on the server running the application.
> > To work fine with SQL Server 2005 you need MDAC 2.8, but if in your
> > system
> > you have also MDAC 2.6, 2.1 ecc...
> > could be IIS don't use the last version ... so if you can, try to
> > remove
> > the old version of mdac.
> >
Hi Monica,
could be this may help you:
http://support.microsoft.com/kb/307255/en-us
I resolved without uninstalling but changhing the reference priority in
Access VB, choosing ADO 2.8 instead of ADO 2.1 and this worked also for a
VB6 application, I think because doing so has changed something in the
registry...
--
Cinzia
---------------------------------------
| http://www.riolab.org |
--------------------------------------->