Connecting Tech Pros Worldwide Forums | Help | Site Map

oracle stored procedure

Newbie
 
Join Date: Nov 2007
Posts: 21
#1: Nov 28 '07
hi can anyone let me know how to get a output param value from stored procedure
i used following code to get the o/p value from stored procedure
so near .value what i need to give
if keep it blank it is giving me error
for input we can give a value but not for output
what i need to write near "?????"

Expand|Select|Wrap|Line Numbers
  1.  
  2. sqlComm = New OracleCommand
  3.  
  4. sqlComm.Parameters.Add(New OracleParameter("p_title", OracleType.VarChar)).Value = title
  5. sqlComm.Parameters.Item("p_title").Direction = ParameterDirection.Input
  6. sqlComm.Parameters.Add(New OracleParameter("pid", OracleType.VarChar)).Value = "???????"
  7. sqlComm.Parameters.Item("pid").Direction = ParameterDirection.Output
  8.  
thanks in advance

amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#2: Nov 29 '07

re: oracle stored procedure


Quote:

Originally Posted by riyap

hi can anyone let me know how to get a output param value from stored procedure
i used following code to get the o/p value from stored procedure
so near .value what i need to give
if keep it blank it is giving me error
for input we can give a value but not for output
what i need to write near "?????"

sqlComm = New OracleCommand

sqlComm.Parameters.Add(New OracleParameter("p_title", OracleType.VarChar)).Value = title
sqlComm.Parameters.Item("p_title").Direction = ParameterDirection.Input
sqlComm.Parameters.Add(New OracleParameter("pid", OracleType.VarChar)).Value = "???????"
sqlComm.Parameters.Item("pid").Direction = ParameterDirection.Output
thanks in advance

Which language you have implemente the above commands?

And could you pelase post your error message for reference?
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#3: Nov 29 '07

re: oracle stored procedure


Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Newbie
 
Join Date: Nov 2007
Posts: 21
#4: Nov 29 '07

re: oracle stored procedure


i did in vb.net for oracle database and the error im getting is
im passing values to the package
Expand|Select|Wrap|Line Numbers
  1. ORA-01036:illegal variable name/number
  2.  
can you please hellp me with this
Reply