0

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

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by dnanetwork
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.