Declaring host variables within an object class
Posted in 1992
Path: emory!swrinde!mips!mips!munnari.oz.au!metro!picasso.cssc-syd.tansu.oz.au!kuanh From: kuanh@picasso.cssc-syd.tansu.oz.au (Kuan Min How) Newsgroups: comp.databases.informix,comp.lang.c++ Message-ID: <1992Mar5.074348.10962@picasso.cssc-syd.tansu.oz.au> Date: 5 Mar 92 07:43:48 GMT Organization: Telecom Australia I have a problem in combining Informix On-Line with C++. The problem is as follows: I declare my host variables in the 'private' section of my object class, PersonSearch as follows: class PersonSearch { private : EXEC SQL BEGIN DECLARE SECTION int PersonID; EXEC SQL END DECLARE SECTION public : Search(); }; The code is as follows: PersonSearch::Search() { .... EXEC SQL SELECT MIN(PersonID) into :PersonID FROM Person .... }; If this code goes through the Informix Precompiler, I will get the error : "host object 'PersonID' not declared " Can anybody help me with this problem.. Kuan HOW.. Email Address is "kuanh@tansu.oz.au" Thank you... Kuan Min How - Telecom Aust |MHSnet: kuanh@cssc-syd.tansu.oz.au Network Services |Snail : 1/18-20 Orion Road, Lane Cove West NSW | 2066 Customised Software Solutions | or PO Box A226, Sydney South 2000, Australia. Centre - Sydney |Phone : +61 2 911 3145 Fax: +61 2 911 3199