Hi...
I have some data that I bring from DB with a Store Procedure, and I want to put them in a OLE DataGrid control. I was trying to do it using a Ado data control but I think ADODC doesn't support sp with parameters. Now, I 'm trying to do it using an ADO command and a recordset, like this:
Set cm = CreateObject("Adodb.Command"
cm.CommandText = "SP_CONSALDS"
cm.CommandType = adCmdStoredProc
cm.ActiveConnection = prmcnConexion
cm.Parameters.Refresh
cm(1) = param1
cm(2) = param2
Set rs=CreateObject("ADODB.Recordset"
rs.CursorType=adOpenKeyset
Set rs=cm.Execute
' finally
set Datagrid1.DataSource=rs
DataGrid1.Refresh
Unfortunatelly, after I execute the cm command, the cursor type property in rs back to 0 (Dynamic)...And in execution time I see the error: The Rowset is not bookmarkable
Are there somedoby that can help me? Thanks.
I have some data that I bring from DB with a Store Procedure, and I want to put them in a OLE DataGrid control. I was trying to do it using a Ado data control but I think ADODC doesn't support sp with parameters. Now, I 'm trying to do it using an ADO command and a recordset, like this:
Set cm = CreateObject("Adodb.Command"
cm.CommandText = "SP_CONSALDS"
cm.CommandType = adCmdStoredProc
cm.ActiveConnection = prmcnConexion
cm.Parameters.Refresh
cm(1) = param1
cm(2) = param2
Set rs=CreateObject("ADODB.Recordset"
rs.CursorType=adOpenKeyset
Set rs=cm.Execute
' finally
set Datagrid1.DataSource=rs
DataGrid1.Refresh
Unfortunatelly, after I execute the cm command, the cursor type property in rs back to 0 (Dynamic)...And in execution time I see the error: The Rowset is not bookmarkable
Are there somedoby that can help me? Thanks.