home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / oraperl2.zip / Hints < prev    next >
Text File  |  1993-07-01  |  2KB  |  53 lines

  1. This file contains hints and tips about Oraperl, dealing with problems which
  2. have arisen in the past.
  3.  
  4.  
  5. Retrieving Dates
  6. ================
  7.  
  8. Due to a bug in earlier versions of Oraperl, it was not possible to return
  9. a DATE field in default format. This has been corrected in patch 3. You may
  10. still wish to use Oracle's to_char() function for greater control over the
  11. format in which the date is returned.
  12.  
  13.  
  14. Building on a Convex machine
  15. ============================
  16.  
  17. Uncomment the definitions of STRTOL and PUTENV in the Makefile.
  18.  
  19.  
  20. Building with Perl v3
  21. =====================
  22.  
  23. Ideally, get hold of v4. However, if you have to work with v3, uncomment
  24. the definition of STR_2MORTAL in the Makefile.
  25.  
  26.  
  27. Using Bind Variables
  28. ====================
  29.  
  30. The support for bind variables does not reflect the full potential of Pro*C.
  31.  
  32. Firstly, bind variables may only be numeric; named bind variables are not
  33. supported. They must run in sequence from 1. (This is to make it easy for
  34. &ora_bind() to check that it has received the correct number of parameters.)
  35.  
  36. Secondly, they may only be used to modify values within the SQL statement,
  37. not field or table names. Thus
  38.  
  39.     insert into telno values (:1, :2)
  40.  
  41. is valid, but
  42.  
  43.     select * from telno order by :1
  44.  
  45. is not. This made the interaction between &ora_open() and &ora_bind() simpler,
  46. but if it's a serious restriction for you let me know, and I'll look into
  47. extending it. (Of course, there's nothing to stop you doing:
  48.  
  49.     $order_by = "name";
  50.     &ora_open($lda, "select * from telno order by $order_by");
  51.  
  52. so I don't think it should be too big a problem.)
  53.