General information
Category:
COM, DCOM and OLE automation
dim remoto as myapp.myclass
set remoto = createobject("myapp.myclass","myserver")
dim RsGrilla as ADODB.Recordset
' this try to assign the recordset to rsgrilla passed byRef
remoto.rs_motivo_imp (RsGrilla)
' and this is my try with a funtion that returns a recordset
' Set rsgrilla = remoto.rset_motimp
' the past two instructions work well, but I can not use that recordset
' for exemple to do the next two tasks: show the five records in a msgbox
' or asociate that recordset with a datacombo object
While RsGrilla.EOF
MsgBox CStr(RsGrilla("codigo_motivo")) + RsGrilla("descripcion")
RsGrilla.MoveNext
Wend
'DCmotivo is a DataCombo object
Set DCmotivo.RowSource = RsGrilla
DCmotivo.ListField = "descripcion"
DCmotivo.BoundColumn = "codigo_motivo"
DCmotivo.Text = RsGrilla("descripcion")
-----------
'In the com object the function or sub opens the recordset like this:
rset_motimp.Open "motivoimpresion", conexion, adOpenKeyset, adLockOptimistic, adCmdTable
' this way is how I try to return the recordset through the parameter
Set rsparam = rset_motimp
' the other way is with the name of the function
' the function is typed this way: ..) as adodb.recordset
functionname= rset_motimp
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only