John Hibner wrote:
> One of the developers here at my company get the
> following when attempting to compile a 4gl script
> based on what he thought the manual was telling
> him:
>
> Example from manual:
> PREPARE up_sel FROM
> "SELECT * FROM customer ",
> "WHERE customer_num between ? and ? ",
> "FOR UPDATE"
>
> Error from Compiler:
>
> prepare stmt1 from
> "select prop_name",
> |______________________^
> |
> | A grammatical error has been found on line
> 23, character 24. The
> | construct is not understandable in its context.
> See error number
> | -4373.
> "from property",
> "where prop = ?"
The PREPARE statement expects a single parameter, but you are supplying 3
parameters. Either supply a single string, or populate a string variable
and then supply the variable name to the PREPARE statement.
Also, your 3 strings, when joined together, do not form valid syntax, as
they do not include punctuating spaces. ;-)
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+
sending to informix-list