Sergey,
In Form::Load .oRS0 is created as RS, then i pass it thru the layers like,
1- UI-Form
llOK=.oCliente.lst_vendas_cliente(.oRS0, lcParam, "usr_sp_Clientes")
2- BusinessObject
lparameters toRS, tcPar, tcStoredProc
LOCAL lOK
llOK = .oData.GetStoredProcRecordSet(toRS, tcPar, tcStoredProc)
3- DataObject::Init
* Create an ADO Connection object.
This.oConnection = createobject('ADODB.Connection')
* Create ADO Command Object
This.oCommand = createobject('ADODB.Command')
4- DataObject
Lparameters toRS, tcParam, tcStoredProc
.SetCommandProperties(tcStoredProc)
WITH .oCommand
.Parameters("@Param1").Value=tcParam
toRs=.Execute
ENDWITH
João
>Can you explain what the problem is? I don't see any connection between User Interface and and ActiveX Data Objects RecordSet in your code.
>Sergey,
>
>Sorry, this is from my other 'Test', my problem now is, i can get the RS but i can´t pass it to the User Interface.
>
>I call it like this in my Form
>
>Load::Method
>
>.oRS0 = createobject('ADODB.RecordSet')
>SET ClassLib TO Clientes, Layers
>.oCliente = CreateObject('Ficha_Clientes', 'DataClass')
>
>Button::Click
>
>llOK=.oCliente.lst_vendas_cliente(.oRS0, lcParam, "usr_sp_Clientes")
>
>Ficha_Clientes::lst_vendas_cliente
>
>lparameters toRS, tcPar, tcStoredProc
>LOCAL lOK
>llOK = .oData.GetStoredProcRecordSet(toRS, tcPar, tcStoredProc)
>
>oData.GetStoredProcRecordSet::Method
>Lparameters toRS, tcParam, tcStoredProc
> .SetCommandProperties(tcStoredProc)
> WITH .oCommand
> .Parameters("@Param1").Value=tcParam
> toRs=.Execute
> ENDWITH
>