Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Type seems to be causing an issue

Type seems to be causing an issue

From: <amerar_at_iwc.net>
Date: Fri, 21 Sep 2007 08:59:17 -0700
Message-ID: <1190390357.746625.103480@22g2000hsm.googlegroups.com>


Hi,

We have a type defined in our database: TYPE "IN_STR_ARR" AS VARRAY (100) OF VARCHAR2(100) We are calling a procedure from PHP:

q = "begin
ZC_INSERT('$_POST[author]','$_POST[type]','$headline','$teaser',:p_ticker,'','','','','','',:p_industry,:p_sector,'D',
$delete,'','',:p_id_out); end;";
$stmt = OCIParse($conn,$q)

OCIBindByName($stmt,':p_ticker',$arr1,32,OCI_B_SQLT_NTY); OCIBindByName($stmt, ":p_id_out", &$result, 33000); OCIExecute($stmt); // line 28
ociexecute($curs);
OCIFreeCursor($stmt);
OCIFreeStatement($curs);

The issue is the error message we are receiving:

Warning: ocibindbyname() expects parameter 5 to be long

Here is the beginning of the Oracle procedure:

PROCEDURE ZC_INSERT (

   p_author         IN NUMBER DEFAULT NULL,
   p_type           IN     NUMBER   DEFAULT NULL,
   p_headline       IN     VARCHAR2 DEFAULT NULL,
   p_teaser         IN     VARCHAR2 DEFAULT NULL,
   p_ticker         IN     IN_STR_ARR,
   p_day_written    IN     VARCHAR2 DEFAULT NULL,
   p_month_written  IN     VARCHAR2 DEFAULT NULL,
   p_year_written   IN     VARCHAR2 DEFAULT NULL,
   p_day_posted     IN     VARCHAR2 DEFAULT NULL,
   p_month_posted   IN     VARCHAR2 DEFAULT NULL,
   p_year_posted    IN     VARCHAR2 DEFAULT NULL,
   p_industry       IN     IN_STR_ARR,
   p_sector         IN     IN_STR_ARR,
   p_action         IN     VARCHAR2 DEFAULT NULL,
   p_id             IN     NUMBER   DEFAULT NULL,
   p_report_id      IN     VARCHAR2 DEFAULT NULL,
   p_media_type     IN     NUMBER   DEFAULT NULL,
   p_media_exp_date IN     VARCHAR2 DEFAULT NULL,
   p_id_out         IN OUT NUMBER) IS


I do not understand. It seems that parameter is of the defined TYPE. I am not a great PHP coder, so this makes no sense to me.

Any advice would be very helpful. We are on 8.1.7.4, soon to be 11i. Received on Fri Sep 21 2007 - 10:59:17 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US