Received: from u1.abs.net (root@u1.abs.net [207.114.0.131]) by hub.org (8.9.1/8.9.1) with ESMTP id MAA25026 for ; Thu, 7 Jan 1999 12:20:26 -0500 (EST) (envelope-from byronn@insightdist.com) Received: from insightdist.com (nobody@localhost) by u1.abs.net (8.9.0/8.9.0) with UUCP id MAA24454 for pgsql-interfaces@hub.org; Thu, 7 Jan 1999 12:08:58 -0500 (EST) X-Authentication-Warning: u1.abs.net: nobody set sender to insightdist.com!byronn using -f Received: from ceodev by insightdist.com (AIX 3.2/UCB 5.64/4.03) id AA26665; Thu, 7 Jan 1999 11:59:46 -0500 Received: from byronn by ceodev (AIX 4.1/UCB 5.64/4.03) id AA31226; Thu, 7 Jan 1999 11:54:31 -0500 Message-Id: <3694E896.FE9B547A@insightdist.com> Date: Thu, 07 Jan 1999 12:02:14 -0500 From: Byron Nikolaidis X-Mailer: Mozilla 4.05 [en] (Win95; I) Mime-Version: 1.0 To: bill@hammondgroves.com Cc: pgsql-interfaces@hub.org, "Thomas G. Lockhart" , "Ken J. Wright" Subject: Re: [INTERFACES] Re: pgsql-interfaces-digest V1 #180 References: <199901071553.KAA69884@osage.gate.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bill Hutto wrote: > Hi again, > Since my first Email apparantly went into the bit bucket, I thought > I'd try again. The following is a post from last year :). Perhaps > some one can give an authoratative answer. > Actually, two different people responded to your mail. However, it doesn't look like they CC'd it to you. Maybe you should register on the pgsql-interfaces list. > > Date: Thu, 31 Dec 1998 15:16:59 +0000 > > From: "Bill Hutto" > > Subject: Money type mapping to VB5 Jet workspace > > > > Hi, > > I'm having problems with the mapping of the money type to an > > appropriate type in Visual Basic 5.0. Presently, it is coming across > > as type float8, and if that were acceptable to me, it isn't when I > > update, because I get an error '524': > > > > parser: attribute 'amount' is of type 'money' but expression is of > > type 'float8' > > You will need to rewrite or cast the expression. > Its not exactly clear what you are trying to do. But I'll take a guess at it. In the postgres database, the "amount" field is obviously of type money. The sql statement, which I haven't seen, is probably trying to do an expression on that column. Unfortunately, you can't easily do expressions on a money field in Postgres, without casting it or something like that. And since the Jet is just sending the statement, it isn't going to work. (I know you mentioned quotes, but the error message above suggests this has nothing to do with quotes -- it is some expression that is killing it. And besides, if it were a quote thing, the error message would have been different.) I recommend forgetting about the money type, and just stick with float for now. When we have full Numeric() support, then you can use a SQL_NUMERIC or SQL_DECIMAL to get the right precision. You will not be able to use dollar signs and commas, but I don't think that is a show stopper, is it? If you need further convincing, there isn't even a "money" data type on the odbc side. Money is merely an attribute of a result set column. And worse in odbc 3.0, I don't see any mention whatsoever of money, even as an attribute! So, it makes it very difficult to convert the field within the driver. If I've missed what you are trying to do, then send the "psqlodbc.log" file of your session so I can see the exact statement. Byron