I am running a stored proc that is returning a recordset. I want to send the recordset to a grid. The problem is that the recordset gets returned as a dynamic cursor with recordset property set to -1. I want to return the rs as readonly static so that I can set the grid recordset property to the returned recordset. This will not work. The grid works fine with other recordset obtained by SQL so it is not a grid problem.
I am running SQL 6.5/SP5a and VB6 /SP4
Code Follows:
Function RunStoredProc(sSQL As String, Optional bTest As Boolean = True) As adoDB.Recordset
Dim vntParams() As String
Dim sDataConnect As String
Dim adoDB As adoDB.Connection
Dim rs As adoDB.Recordset
Dim adoCommand As New adoDB.Command
Set adoCommand.ActiveConnection = g_adoDB
adoCommand.CommandType = adCmdStoredProc
adoCommand.CommandText = "sp_jhsTest "
Set rs = adoCommand.Execute
Set RunStoredProc = rs
End Function
I am running SQL 6.5/SP5a and VB6 /SP4
Code Follows:
Function RunStoredProc(sSQL As String, Optional bTest As Boolean = True) As adoDB.Recordset
Dim vntParams() As String
Dim sDataConnect As String
Dim adoDB As adoDB.Connection
Dim rs As adoDB.Recordset
Dim adoCommand As New adoDB.Command
Set adoCommand.ActiveConnection = g_adoDB
adoCommand.CommandType = adCmdStoredProc
adoCommand.CommandText = "sp_jhsTest "
Set rs = adoCommand.Execute
Set RunStoredProc = rs
End Function