Re: ESQL/C insert statement problem
Posted in 1991
Path: emory!swrinde!mips!sdd.hp.com!hplabs!pyramid!infmx!jacob From: jacob@informix.com (Jacob Salomon) Newsgroups: comp.databases.informix Summary: Semantic error in ESQL/C Message-ID: <1991Dec10.212029.12845@informix.com> Date: 10 Dec 91 21:20:29 GMT References: <1991Dec05.192501.13636@dircon.co.uk> Sender: news@informix.com (Usenet News) Organization: Informix Software, Inc. In article <1991Dec05.192501.13636@dircon.co.uk> uaa1006@dircon.co.uk (Peter Miles) writes: | |The manual for Informix-Esql/C (Version 4.0) says that if you |have a structure defined as follows... | |$struct foo |{ | char name[20]; | char address[20]; | char phone[20]; |} bar; | |...you can use the following statement to add a record to a |table... | | $insert $foo into customer; | |(where customer is the table name). | |However, when I try this, I get the following compile time error: | | Syntax error on keyword or symbol '$'. (sqlhost.y) | |I assume the '$' being complained about is the one on the $foo |part of the statement. However, removing the $ gets ... | | Syntax error on identifier 'foo'. | |Is this a bug, or am I doing something wrong? | | -- Pete Whoa there, Pete! 'foo' is the name of the structure template. If you did this in C is would blow up in your face! Be greatful for the merciful Bronx cheer. ;-) The name of the host variable in your example is 'bar'. Try: $insert $bar into customer; Put that in your liquor bar and see if the babysitter drinks it! -- Jake -- ----------------Obligatory smart-$$$ remark:--------------------- | There's two kinds of people: Those who categorize people into | | two groups and those who don't. (Aging proverb.) | -----------------------------------------------------------------