Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Can't set cursor type in asp

Author  Topic 

wcrellin
Starting Member

1 Post

Posted - 2001-06-20 : 09:25:46
What would prevent me from being able to specify a cursor type from an asp page?

When I use a client side cursor the only cusor type returned after the open is Static no mater what I try to set it to. This happens on all the db's I tried on our server.

With a Server side cursor if I specify static I get static on my database. If I specify anything else I get dynamic. This seems to have something to do with the database because the same code (changing ID,Pwd,DB) returns the specified cursor against the Northwind and several other databases on the same SQL server 7 machine.

Set objCn = Server.CreateObject("ADODB.Connection")
objCn.ConnectionString = "Provider=SQLOLEDB.1;Password=mypwd;Persist Security Info=False;User ID=myID;Initial Catalog=myDB;Data Source=SQLServer"
objCn.Open

strSql = "Select * from TableName"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSql objCn, adOpenKeyset, adLockOptimistic

Thanks for any help.
Warren Crellin
warren.crellin@apg.amedd.army.mil


   

- Advertisement -