home *** CD-ROM | disk | FTP | other *** search
-
- This file contains hints and tips about Oraperl, dealing with problems which
- have arisen in the past.
-
-
- Retrieving Dates
- ================
-
- If you want to retrieve a field which is declared as an Oracle DATE, then you
- must explicitly format it using the SQL*Plus TO_CHAR function, for example:
-
- $csr = &ora_open($lda, "select to_char(sysdate, 'DD/MM/YY') from dual")
-
- Otherwise, Oracle tells Oraperl that the field only occupies seven bytes,
- and a truncation error occurs when the field is fetched. This causes
- &ora_fetch() to return an error.
-
- I hope to correct this in a future patch.
-
-
- Building on a Convex machine
- ============================
-
- The strtol() function used at the start of most of the functions in orafns.c
- and in oracle.mus must be replaced by strtoul() to allow larger addresses to
- be converted.
-
- The putenv() function used in set_sid() must be replaced by setenv() .
-
-
- Using Bind Variables
- ====================
-
- The support for bind variables does not reflect the full potential of Pro*C.
-
- Firstly, bind variables may only be numeric; named bind variables are not
- supported. They must run in sequence from 1. (This is to make it easy for
- &ora_bind() to check that it has received the correct number of parameters.)
-
- Secondly, they may only be used to modify values within the SQL statement,
- not field or table names. Thus
-
- insert into telno values (:1, :2)
-
- is valid, but
-
- select * from telno order by :1
-
- is not. This made the interaction between &ora_open() and &ora_bind() simpler,
- but if it's a serious restriction for you let me know, and I'll look into
- extending it. (Of course, there's nothing to stop you doing:
-
- $order_by = "name";
- &ora_open($lda, "select * from telno order by $order_by");
-
- so I don't think it should be too big a problem.)
-