command cursor type

Results 1 to 2 of 2

Thread: command cursor type

  1. #1
    Join Date
    Dec 1969

    Default command cursor type

    Hi all,<BR>How can i change the cursor type of the the following command? The command calls a stored procedure and returns a recordset. It works ok but i need an open cursor so i can page through records.<BR>Heres the command and thanks in advance for any tips<BR><BR><BR>&#060;%<BR><BR>Dim cmdAlist__varRsType<BR>cmdAlist__varRsType = "Audio"<BR>if(Request("varRsType") &#060;&#062; "") then cmdAlist__varRsType = Request("varRsType")<BR><BR>%&#062;<BR>&#060;%<BR> <BR>set cmdAlist = Server.CreateObject("ADODB.Command")<BR>cmdAlist.A ctiveConnection = MSSQL3hi_STRING<BR>cmdAlist.CommandText = "dbo.p_AudioList"<BR>cmdAlist.CommandType = 4<BR>cmdAlist.CommandTimeout = 0<BR>cmdAlist.Prepared = true<BR>cmdAlist.Parameters.Append cmdAlist.CreateParameter("@RETURN_VALUE", 3, 4)<BR>cmdAlist.Parameters.Append cmdAlist.CreateParameter("@varRsType", 200, 1,15,cmdAlist__varRsType)<BR>set rsTest = cmdAlist.Execute<BR>rsTest_numRows = 0<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: command cursor type

    .execute() will always return a forward only cursor. do this instead :<BR><BR>set rsTest = Server.CreateObject("ADODB.Connection")<BR>rsTest. Open cmdAList, objConn, adOpenDynamic, adLockReadOnly, adCmdUnknown &#039; maybe adCmdStoredProc in this case<BR><BR><BR><BR><BR>j<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts