home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / informix / 2844 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.2 KB  |  49 lines

  1. Newsgroups: comp.databases.informix
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-cv!hp-pcd!hp-vcd!kenm
  3. From: kenm@PROBLEM_WITH_INEWS_GATEWAY_FILE (Ken Miles)
  4. Subject: Re: parameters as host variables
  5. Sender: news@vcd.hp.com (News user)
  6. Message-ID: <C03I8L.D7z@vcd.hp.com>
  7. Date: Wed, 30 Dec 1992 23:21:57 GMT
  8. References: <QfCU96n0BwxdA_oKYR@transarc.com>
  9. Organization: Hewlett-Packard VCD
  10. X-Newsreader: Tin 1.1 PL5
  11. Lines: 36
  12.  
  13. Mark_Sherman@transarc.com wrote:
  14. > I think I must be missing something obvious, but I can not seem to let
  15. > procedure parameters be used as host variables in esql programs, e.g.,
  16. >     void foo(a,b)
  17. >         EXEC SQL BEGIN DECLARE SECTION;
  18. >         long int a;
  19. >         long int b;
  20. >         EXEC SQL END DECLARE SECTION;
  21. >     {
  22. >         EXEC SQL
  23. >             UPDATE mytable
  24. >             SET mycolumn = :a
  25. >             WHERE myindex = :b;
  26. >     }
  27. >
  28.   [ . . . ]
  29.  
  30. > Am I missing something obvious? Thanks.
  31. >     -Mark (mss@transarc.com)
  32.  
  33. Try the "parameter" keyword Mark:
  34.  
  35.     void foo(a,b)
  36.          EXEC SQL BEGIN DECLARE SECTION;
  37.          parameter long int a;
  38.      .
  39.      etc.
  40.  
  41. The 5.0 ESQL/C Programmer's Manual (P 1-16) has more information.
  42.  
  43. -Ken Miles
  44. Hewlett-Packard
  45. Vancouver Division
  46. kenm@vcd.hp.com
  47.  
  48.