Passing boolean parameters to Oracle

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Passing boolean parameters to Oracle

    Hello there everyone.
    I have just started to work with Oracle stored procedures. I have written a
    procedure that takes a boolean value as one of its input parameters, but I
    cannot find out how to get Coldfusion to pass the value in correctly. If I
    execute the procedure within the Oracle client itself it works OK but CF always
    gives the error "PLS-00306: wrong number or types of arguments in call to
    'PROC_TEST' ORA-06550: line 1, column 7: PL/SQL: Statement ignored", no matter
    how I try to pass my boolean value. I have tried to use all combinations of
    CF_SQL_BIT and CF_SQL_INTEGER and "1" and "true" and "TRUE" in the
    <cfprocparam> tag, but none of them are working. I guess I could change the
    code to use an integer instead, but using a boolean for this example makes the
    most sense.

    If anyone has any ideas, that would be great.

    Regards
    Barry.

    Barry Andre Guest

  2. Similar Questions and Discussions

    1. Passing Parameters To CFC
      I am testing how to return data from a CFC within Flash Forms. I have a simple <cfselect> tag that will hold data returned from a CFC. This CFC...
    2. Boolean in Grid not passing the value
      Hi again, using Flash Remoting under mac OS X with mysql 5.01, I have a grid that, once a row is selected, displays the information of the row in...
    3. passing parameters
      Hi Michael, I think you want to modify the links in web control programmatically. You can add several Hyperlink controls to the user control,...
    4. Passing Parameters into NEW()
      Is there any way that the NEW() of a web service can accept parameters ? I would like to pass a boolean to indicate to the webservice that I am in...
    5. Help Passing Parameters
      Before going to the third script I'd suggest storing the variables in session variables. Here's how I generally do login scripts. Perhaps have...
  3. #2

    Default Re: Passing boolean parameters to Oracle

    Th PL/SQL Boolean datatype can be used only within PL/SQL, and is
    not considered a "valid" datatype by the Oracle RDBMS. In other words, you
    can't use Boolean outside of PL/SQL. Consider that you can not create a column
    of type Boolean in an Oracle table -- you can neither SELECT into a Boolean
    variable nor insert a TRUE or FALSE value directly into a database column.

    If you can, you should change the PL/SQL stored procedure parameter to a type
    that you can pass from ColdFusion, such as bit or int, then "convert" the
    passed value to a boolean within the procedure if you really need the
    functionality of a Boolean variable within your PL/SQL.

    Phil

    paross1 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139