RE: Can I do this in ESQL/C
Posted in 1998
Preparing a statement is the only way I can think of to handle this problem. Regards, Tim Hope - Ciber Inc Phone (770) 724-0207 Automobile - A vehicle that runs up hills and down pedestrians -----Original Message----- From: billy [SMTP:billy@west.co.za] Sent: Wednesday, August 26, 1998 8:16 AM To: dirk.hellmann; informix-list Cc: billy Subject: Re: Can I do this in ESQL/C On 26 Aug 98 at 9:35, dirk.hellmann@laufenberg.com wrote: > $int dataID; > $int classTYPE; > $char tableName[32]; > > strcpy(tableName, "foo1"); > > $SELECT tableName.dataid, tableName.classtype INTO $dataID, > $classTYPE > FROM tableName WHERE tableName.dataid < 50; . . . I want to use an > esql-variable for the tableName instead of the real table-name. The > compiler say nothing but i got an 206 - specified table not in DB - > when running, because esql didn't recognize, that i want to use a > variable. How can i tell esql to use this variable, or is it > impossible. Dirk, I'm really rusty on ESQL/C, but you might want to look into PREPAREing a statement from a character string. HTH. -- Ciao, Billy /Group Managing Director, The West Solutions Group: http://www.west.co.za \\ Drivel @ http://www.west.co.za/tasteless/ / \\ "Granted, Mr Wheeler's ideas are stupid and unreasonable, but he does own the company and I / think we should go along with him..." \\_______________________________________________________________________ _________________________