Hi,

This is my code. Here I want to retrieve return value of stored procedure. when I am executing this, I am receiving exception as string[1] string invalid index[0].

coding..

cmd.CommandText = "sp_dat_enc"
                        Dim params() As OleDbParameter = {New OleDbParameter("@pVisitDates", r("visit_dates").ToString)}
                        Dim ret_val As New OleDbParameter("@DataOut", OleDbType.VarChar)
                        ret_val.Direction = ParameterDirection.ReturnValue
                        cmd.Parameters.Clear()
                        cmd.Parameters.AddRange(params)
                        cmd.Parameters.Add(ret_val)
                        Dim ddr As OleDbDataReader = cmd.ExecuteReader