Re: Problem with VB6, DAO, Data Control: Update does

From: Wolfgang Fürtbauer <w(dot)fuertbauer(at)eunet(dot)at>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Problem with VB6, DAO, Data Control: Update does
Date: 2004-08-21 15:59:15
Message-ID: 6.0.3.0.2.20040821175840.026d0550@mbox.tiscali-business.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc


> > Wolfgang Fürtbauer wrote:
> > > I found out, after removing the "rabwert" = '5.225'::float4 from the
> > > where-clause,
> > > the update worked; so I had a look with the VB-Debugger at the value
> > > of data1.recordset!rabwert
> > > just before update and: the value was 5.225
> > >
> > > Why does the update not work ?
>
> > You can't reasonably compare floating point values for equality, because
> > they only store approximations of what you see. And you certainly
> > shouldn't store monetary values in floating point columns, because you
> > are asking for rounding problems. Always use numeric.
OK; I changed to numeric(8,4) for this field; what happens is:
VB does'nt regocnize decimals anymore:

from pgsql:
update auftrag set rabproz = 5.5;

from VB in debug mode:
? data1.recordset!rabproz
5.5
? data.recordset!rabproz > 5
True
? data.recordset!rabproz < 6
False
? data.recordset!rabproz > 50
True
? data.recordset!rabproz < 60
True

and bound controls display the value without decimals ?

What am I doing wrong ?

Wolfgang

> > --
> > Peter Eisentraut
> > http://developer.postgresql.org/~petere/
>
>
>
>----------------------------------------------------------------------
>Wolfgang Fuertbauer (E-Mail: Wolfgang(dot)Fuertbauer(at)ebewe(dot)com)
>EBEWE Pharma Tel: ++43 7665 8123 315
>Mondseestrasse 11 Fax: ++43 7665 8123 11
>4866 Unterach, Austria
>http://www.ebewe.com
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html

---------------------------------------------------------------------
Wolfgang Fürtbauer Tel: +43 7612 77620
Steinbichlstrasse 58d Mobil: +43 650 7762001
A-4812
Pinsdorf w(dot)fuertbauer(at)eunet(dot)at

Browse pgsql-odbc by date

  From Date Subject
Next Message Mischa Sandberg 2004-08-22 04:49:45 Re: Access - ODBC - serial problem...
Previous Message Antonio Pennino 2004-08-18 13:18:33 Re: problem with CVS version (Msg-ID: <41237349.3061.12DF040@localhost>)