im doing a stored procedure in
vb.net 2005 using oracle(10g express edition)with the following commands.
objCommand.CommandText = "bookpackagetest.usp_selectbook"
objCommand.CommandType = CommandType.StoredProcedure
objCommand.Parameters.Add("inSearchStr", OracleType.VarChar, searchText.Length).Value = searchText.ToString
objCommand.Parameters.Add("results_cursor", OracleType.Cursor)
objCommand.Parameters.Item(0).Direction = ParameterDirection.Output
objDataAdapter = New OracleDataAdapter(objCommand)
objDataAdapter.SelectCommand = objCommand
objDataReaderBook = objCommand.ExecuteReader
however, i encountered the following error. pls help me find my mistake. thank you so much!
Message="ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'USP_SELECTBOOK'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored"
create or replace package body bookpackagetest
as
procedure usp_selectbook (inSearchStr IN VARCHAR,results_cursor out cursor_type)
as
begin
open results_cursor for
select booklist.isbn,booklist.title,authors.author,bookli st.publisher,booklist.edition,
booklist.purchasedate,booklist.copyright,booklist. category,booklist.copy
from booklist left outer join authors on booklist.author_id=authors.author_id
where upper(booklist.title) like inSearchStr;
end;
end;
ariel