Re: parameters as host variables
Posted in 1992
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