Hello,
could anyone tell me what is the most effective ways to pass a recordset to a function.
Normally I wiuld pass it a an adodb.recordset
in the parameter listing, but would like to know if there is a tidier way of doing this?
Thanks
Tony.
Printable View
Hello,
could anyone tell me what is the most effective ways to pass a recordset to a function.
Normally I wiuld pass it a an adodb.recordset
in the parameter listing, but would like to know if there is a tidier way of doing this?
Thanks
Tony.
I think the way you use is the best! Passing a variable to a function or procedure by using a parameter is the most structured way there is and every programmer should use it!
Forest, could you elaborate on the proper way to do this, with a small code example?
I'm afraid I stink with Parameters, and never quite got the hang of why/when.
Code:Public Sub MySubroutine(objRS as Adodb.Recordset)
Msgbox objRS.fields(0).value
End Sub