I need to retrieve a table from a SQL server User Defined Function in VB6. How can this be accomplished? Here's the sample code I'm working with. It errors after it executes: The parameter is incorrect.
Dim aRS As New ADODB.Recordset
Dim MyCommand As New ADODB.Command
.ActiveConnection = fAdoCnn
.CommandType = adCmdStoredProc
.CommandText = "fn_Calculate_YTD_Totals"
.Parameters("@RegionID") = gintRegionID
Set aRS = .Execute