home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / database / oracle / 2560 < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.5 KB  |  47 lines

  1. Newsgroups: comp.databases.oracle
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!csn!news.den.mmc.com!crowded-house!richard
  3. From: richard@crowded-house.den.mmc.com (Richard Armstrong)
  4. Subject: Pro*C
  5. Message-ID: <1992Dec17.195431.13161@den.mmc.com>
  6. Sender: news@den.mmc.com (News)
  7. Nntp-Posting-Host: crowded-house.den.mmc.com
  8. Organization: Martin Marietta
  9. Date: Thu, 17 Dec 1992 19:54:31 GMT
  10. Lines: 35
  11.  
  12.  
  13. I have plenty of good things to say about Oracle Pro*C. However, let me
  14. focus on one area where I find Pro*C completely brain-dead.
  15.  
  16. I am running v6 on Sun 690's.
  17.  
  18. Why doesn't the Pro*C precompiler do #define substitutions? For instance,
  19. one cannot do the following:
  20.  
  21. #define MAXLEN 80
  22.  
  23. EXEC SQL BEGIN DECLARE SECTION;
  24. varchar string[MAXLEN + 1];
  25. EXEC SQL END DECLARE SECTION;
  26.  
  27. Pro*C doesn't like MAXLEN, so I run the C pre-processor to do the substitution,
  28. but then Pro*C doesn't like the [80 + 1]. So I had to write my own pre-
  29. processor to do the math.
  30.  
  31. I have a solution, but it requires running cpp, and my own custom pre-processor,
  32. and then finally running Pro*C.  Does this seem lame to anyone besides me?
  33.  
  34. Is this fixed in v7?  I am stuck with v6 for now... Does anyone have a fix
  35. to this better than what I came up with?
  36.  
  37. This is my only real show-stopper complaint with Pro*C.
  38.  
  39. Any input is appreciated.
  40.  
  41.  
  42. -- 
  43. My company never said any of this... I didn't either.
  44. Richard Armstrong, Software Engineer, Martin Marietta
  45. Email->>>> richard@crowded-house.den.mmc.com <<<<-Email 
  46.  
  47.