I'm trying to set the CursorType and Record Locking of a SQL Server 7.0
stored procedure being called from an ASP page. I've seen tons of
documentation on how to add these options using a recordset, but because
I'm building the SELECT statement in a stored procedure, I have to use a
Command Object like the following:
set Command1 = Server.CreateObject("ADODB.Command")
Command1.ActiveConnection = MM_pkidev_pki_STRING
Command1.CommandText = "dbo.sp_faqsearch"
Command1.Parameters.Append Command1.CreateParameter("@freetext_search",
200, 1,500,Command1__freetext_search)
Command1.Parameters.Append Command1.CreateParameter("@category_search", 3,
1,4,Command1__category_search)
Command1.CommandType = 4
Command1.CommandTimeout = 0
Command1.Prepared = true
set Recordset1 = Command1.execute
Recordset1_numRows = 0
I tried adding the needed information to the Recordset at the bottom like
so:
Recordset1.CursorLocation = adUseClient
Recordset1.Open, adOpenStatic, adLockReadOnly
but I keep getting the following message:
ADODB.Recordset error '800a0e79'
Operation is not allowed when the object is open.
I'm assuming the command1.execute is already opening the recordset, so I'm
not sure how to add that information in. Any smart people have any ideas
on how to implement this??
Thanks in advance,
Tony