p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: Unknow Cursor Type

Message #1 by "Michael Wong" <michael@n...> on Mon, 14 Aug 2000 10:21:20
Hello Everyone!

The problem...
    Open method of RecordSet object always returns unknown cursor type
    when its CommandType property is set to adCmdStoredProc even though
    cursor type parameter is specified.

Database: SQL Server 7 (Service Pack 2)
Platform: IIS 5 on Window 2000 Advanced Server (Service Pack 1)

Sample Code...

<!--#include file="adovbs.inc"-->

Dim oConn, oCmd, oRS

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open Application("DbConnectionString")

Set oCmd = Server.CreateObject("ADODB.Command")
With oCmd
    .ActiveConnection = oConn
    .CommandText = "sp_get_customer_list"
    .CommandType = adCmdStoredProc
End With

Set oRS = Server.CreateObject("ADODB.Recordset")

oRS.Open oCmd,  ,  adOpenStatic,  adLockReadOnly


Am I missing something or is it a bug?

Please help.


Michael Wong

From Hong Kong

  Return to Index