asp.net - ODP.NET VB.Net calling a stored procedure and returning a refCursor -


Text after "

This problem has driven me crazy more than a day now. I can make a connection to the database, I execute SQL and that's the result in itself, but I can not seem to call a stored procedure. Here is the code

  New MyCMD as the new OracleCommand Dim TheDataReader as new OracleDataReader myConnection1.Open () myCMD.Connection = myConnection1 myCMD.CommandType = CommandType.StoredProcedure myCMD.CommandText = "WS_DATA_LAYER .select_user_groups "myCMD.Parameters.Add (new OracleParameter (" id_user ", OracleDbType.VarChar2)). Value = "Txa" myCMD.Parameters.Add (new OracleParameter ("ws_rs", OracleDbType.RefCursor)). Direction = ParameterDirection.Output 'has tried every single execution function and none of the work is done here' either error thrown or empty refresher myCMD.ExecuteScalar () TheDataReader = myCMD.Parameters (1) .Value () GetDataReader ()   

At this time, the problem lies in the execution slaler. It is throwing an exception that was called "the input string was not in a correct format". I tried to cross the string with the Oracle single quotation marks and get the same thing if I use

  TheDataReader = myCMD.ExecuteQuery ()   < P> It works fine but no results are given. I have verified that as a result of this process, I give results for the user in which I am logged in. When the query was being executed, I could see a refresher there but it was empty. I should be crazy  

Any help is appreciated

This problem is, I The VB method was passing OracleDBType.Varchar2 as the parameter. But I had declared it as an integer, it obviously needs to be passed as an OracleDBType

Comments