Link to home
Start Free TrialLog in
Avatar of timothyrmyers
timothyrmyers

asked on

Classic ASP SQL Server error

Error message is Microsoft OLE DB Provider for SQL Server error '80040e21' The requested properties cannot be supported.

I am trying to get this code to run on my new dev environment.  If I comment out lines 4,5 and 6, the code works.  This code does work on the production box.  I have tried updating MDAC.  My sql server driver is version 2000.86.3959.00 which is the same as production.   I can't comment out the lines because there are hundreds of other lines of code similar to this.



Set RSPortalProgrammer = Server.CreateObject("ADODB.Recordset")
RSPortalProgrammer.ActiveConnection = MM_PortalDBConn_STRING
RSPortalProgrammer.Source = "SELECT * FROM tblNames"
RSPortalProgrammer.CursorType = 0
RSPortalProgrammer.CursorLocation = 2
RSPortalProgrammer.LockType = 3
RSPortalProgrammer.Open()

Open in new window

Avatar of Aanvik
Aanvik

Try this,
RSPortalProgrammer.CursorLocation = adUseClient
RSPortalProgrammer.CursorType = adOpenStatic
RSPortalProgrammer.LockType = adLockBatchOptimistic

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Banthor
Banthor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of timothyrmyers

ASKER

This is what i got with the first solution:

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
The First Solution will work if you Include My attached File.
adodb-enumerations.txt
They convert the Enumerations in the Actual Values.
 
Avatar of Anthony Perkins
This does not make sense.  Those attributes (UseServer, ForwardOnly, ReadOnly) should be the default.  What happens when you try it this way (on a temporary basis for testing purposes only):

Set cn = Server.CreateObject("ADODB.Connection")
cn.ConnectionString = MM_PortalDBConn_STRING
cn.Open
Set RSPortalProgrammer = cn.Execute("SELECT * FROM tblNames")
ResponseWrite "CursorType = " & CStr(RSPortalProgrammer.CursorType) & "<br>"
ResponseWrite "CursorLocation = " & CStr(RSPortalProgrammer.CursorLocation) & "<br>"
ResponseWrite "LockType = " & CStr(RSPortalProgrammer.LockType) & "<br>"
RSPortalProgrammer.Close
cn.Close