home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases.informix
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-cv!hp-pcd!hp-vcd!kenm
- From: kenm@PROBLEM_WITH_INEWS_GATEWAY_FILE (Ken Miles)
- Subject: Re: parameters as host variables
- Sender: news@vcd.hp.com (News user)
- Message-ID: <C03I8L.D7z@vcd.hp.com>
- Date: Wed, 30 Dec 1992 23:21:57 GMT
- References: <QfCU96n0BwxdA_oKYR@transarc.com>
- Organization: Hewlett-Packard VCD
- X-Newsreader: Tin 1.1 PL5
- Lines: 36
-
- Mark_Sherman@transarc.com wrote:
- > I think I must be missing something obvious, but I can not seem to let
- > procedure parameters be used as host variables in esql programs, e.g.,
- >
- > void foo(a,b)
- > EXEC SQL BEGIN DECLARE SECTION;
- > long int a;
- > long int b;
- > EXEC SQL END DECLARE SECTION;
- > {
- > EXEC SQL
- > UPDATE mytable
- > SET mycolumn = :a
- > WHERE myindex = :b;
- > }
- >
- [ . . . ]
-
- > Am I missing something obvious? Thanks.
- > -Mark (mss@transarc.com)
-
- Try the "parameter" keyword Mark:
-
- void foo(a,b)
- EXEC SQL BEGIN DECLARE SECTION;
- parameter long int a;
- .
- etc.
-
- The 5.0 ESQL/C Programmer's Manual (P 1-16) has more information.
-
- -Ken Miles
- Hewlett-Packard
- Vancouver Division
- kenm@vcd.hp.com
-
-