Re: SQL Server 2000 to 2005 shows error in classic asp : Row handle referred to a deleted row or a row marked for deletion



Bob

Thanks for the advice. I have made it work by using

rs.Open sql, conn, 3, , adCmdText

It's probably not the most effective way but it will do for the time being
(I can't believe I hadn't tried it already! )

Alex

"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:OJcCxMIbHHA.3584@xxxxxxxxxxxxxxxxxxxxxxx
Alex Clay wrote:
After upgrading from SQL Server 2000, I now have problems accessing
SQL Server 2005 from classic asp pages served from a Windows Server
2000

The basics of the code are as follows :

Set conn = Server.CreateObject("ADODB.Connection")
conn.open "DRIVER={SQL Server};" &
Application("appConnString")

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 3, 3

totrecs = rs.recordcount

rs.Move 0

The error thrown up refers to the last line and is as follows :

Microsoft OLE DB Provider for ODBC Drivers (0x80040E23)
Row handle referred to a deleted row or a row marked for
deletion

I need to have cursor type setting in the "rs.Open sql, conn, 3, 3"
line. There are over 5000 records in the table being queried.

Is there a tweak on SQL Server 2005 that will allow this code to run?
When I point the same code to SQL Server 2000 it works fine.

Your help is greatly appreciated

Alex Clay

I've never encountered this error, so let's start narrowing things down:
1. Do you get the same error using the SQLOLEDB provider instead of the
ODBC provider?
2. Do you get the same error regardless of cursor type setting? Start
with the default:
Set rs = conn.execute(sql,,adCmdText)
3. In an ASP application, what is the rationale for using such an
expensive cursor? Are you really planning to have it open long enough to
care about what other users are doing?

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.




.



Relevant Pages

  • RE: SQL Server Error
    ... SQL 2000 Server ... It is an Access 97 database ... Set conn = New ADODB.Connection ...
    (microsoft.public.sqlserver.server)
  • Re: Prüfen auf is Nothing?
    ... > Connection zulassen (um ggf. ... > Public Sub OpenDyna(R As ADODB.Recordset, SQL As String, Optional Conn ...
    (microsoft.public.de.access.clientserver)
  • Re: Prüfen auf is Nothing?
    ... >> Public Sub OpenDyna(R As ADODB.Recordset, SQL As String, Optional Conn ... >> End Sub ...
    (microsoft.public.de.access.clientserver)
  • RE: sql criteria change
    ... you don't really need to use MS Query. ... Dim SQL As String ... Dim conn As ADODB.Connection ...
    (microsoft.public.excel.programming)
  • Re: Data Access done simply ...
    ... System.Data.SqlClient.SqlConnection conn; ... System.Data.DataSet dsNames; ... "Jon Rowlan" wrote: ... I want to connect to an SQL database, execute a SQL command to return a ...
    (microsoft.public.vstudio.development)