Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle stored procedure command boolean parameter

Status
Not open for further replies.

RobNisbet

Programmer
Jul 10, 2001
22
0
0
GB
I am using a command object in asp to call a db (oracle) stored proc.I have hit a stumbling block with a boolean data type parameter tho..

PROCEDURE x (....
p_2 in BOOLEAN,...)

has a boolean parameter...but trying all sorts of ways of passing eg.
Cmd.Parameters.Append Cmd. CreateParameter("p_2",adboolean, adParamInput,4,true)
Cmd.Parameters.Append Cmd. CreateParameter("p_2",adboolean, adParamInput,1,1)
Cmd.Parameters.Append Cmd. CreateParameter("p_2",advarchar, adParamInput,4,"TRUE")
etc
I always get
Microsoft OLE DB Provider for Oracle error '80040e14'
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'x' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
/ate/v_6/change_case_stage.asp, line 62
(Line 62 is the .execute)
Removing the boolean parameter from asp and the procedure and all works OK....so I must be specifying the boolean parameter incorrectly in asp. Any ideas ?
I know I can pass as a string and convert to boolean in the sp ... but can't since other objects already access the sp.
Thanx guys.
 
Please can someone have a look at this !
There must be someone out there who has used a boolean parameter ? Thankx!
 
It is probable because Oracle databases don't have a Boolean datatype even though PL/sql does.
 
He is right..You'll need to use 0 and -1, I believe. If you can paste your output after you [sucessfully?] run the stored procedure from the SQL*Plus window.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top