logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: Problem with VB6, DAO, Data Control: Update does not work: msg#00031

db.postgresql.odbc

Subject: Re: Problem with VB6, DAO, Data Control: Update does not work

> 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.Fuertbauer@xxxxxxxxx)
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



<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo