Is there a way to set CursorType for the ADODB.RecordSet that I get from ADODB.Command.Execute ?
I know that this is possible if I do this:
rs = Server.CreateObject("ADODB.RecordSet") rs.Open(cmd)
However, I am currently using Command.Execute with a Parameters Parameters that automatically handles parameter arrays ? for safe interpolation. Therefore, using RecordSet.Open not an option.
In particular, my code currently looks like this:
function ExecuteSQL(conn, sql, args) set ExecuteSQL_CmdObj = Server.CreateObject("ADODB.Command") ExecuteSQL_CmdObj.CommandType = adCmdText ExecuteSQL_CmdObj.CommandText = sql ExecuteSQL_CmdObj.ActiveConnection = conn if Ubound(args) = -1 then set ExecuteSQL = ExecuteSQL_CmdObj.Execute else set ExecuteSQL = ExecuteSQL_CmdObj.Execute(,args) end if end function
If I want to support the same API, but also control CursorType , how can this be done?
source share