Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!ucsd!usc!snorkelwacker!bloom-beacon!eru!luth!sunic!mcsun!ukc!axion!vision!chris From: chris@vision.UUCP (Chris Davies) Newsgroups: comp.databases Subject: INGRES Esql/C & Money format Message-ID: <1148@vision.UUCP> Date: 27 Jul 90 11:28:40 GMT Reply-To: chris@vision.UUCP (Chris Davies) Organization: VisionWare Ltd., Leeds, UK Lines: 29 System is AT&T SysV.3 Unix, Ingres 6.0 - 6.2 (so far). I have almost finished writing a C program using dynamic SQL. Everything's hunkydory except the Ingres MONEY datatype. I'm having problems converting this datatype to a C string (it only maps to a C double float). Can anyone point me to an Ingres function to do this (at the C level) or suggest how I can find out if the user has specified any of II_MONEY_FORMAT, II_MONEY_PREC, or II_DECIMAL? These won't necessarily be in the user's environment (getenv() and friends); they might be in the Ingres environment (use ingprenv to display these). Using sprintf("%lf"...) alone doesn't help, since this (obviously) ignores these Ingres variables. If I'm desperate, I'll end up reading .../ingres/files/symbol.tbl to find what variables are defined in the Ingres environment. Oh yes. I cannot change the SQL queries, so any solution must be useful at the C program level. Suggestions please! Thanks, Chris -- VISIONWARE LTD | UK: chris@vision.uucp JANET: chris%vision.uucp@ukc 57 Cardigan Lane | US: chris@vware.mn.org OTHER: chris@vision.co.uk LEEDS LS4 2LE | BANGNET: ...{backbone}!ukc!vision!chris England | VOICE: +44 532 788858 FAX: +44 532 304676 -------------- "VisionWare: The home of DOS/UNIX/X integration" --------------