 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
P.S. Guest
|
Posted: Tue Sep 02, 2003 2:27 pm Post subject: Decimal Places Disappearing (literally!) |
|
|
Hi,
I have a complicated problem and I'm running out of ideas to solve it.
I'll try to describe it shortly:
I have a D4 app (which uses BDE and SQL Links to connect to an
Informix DS 7.30 DB Server) wich previews a QuickReport 3.0.8 Prof.
report.
On this app. I have a form for editing table data on which one of its
columns has 2 decimal places. The DB column is of type DECIMAL:
CREATE TABLE informix.rh_rf_item_sopval (
item_sop CHAR(4) NOT NULL,
codrest CHAR(1) NOT NULL,
valor_sop DECIMAL(8,2) NOT NULL,
data_act DATE NOT NULL,
codoper CHAR( NOT NULL
) EXTENT SIZE 16 NEXT SIZE 16 LOCK MODE ROW
Delphi and BDE sees this column as:
ODS: SQL Data Out: INFORMIX - Column = 3, Name = valor_sop, Type =
fldFLOAT, Precision = 8, Scale = 2, Data = 0.000000 Process ID:
$00000408.
THE PROBLEM IS:
The decimal places are correctly stored on the DB server. The 2
relevant decimal places appear on DBgrids and DBedits correctly.
After I preview the report (QR 3.0. and press a button wich exports
the report to PDF (via Pragnaan export filters) and sends an e-mail
(via MAPI services, MapiLogon, MapiSendMail and MapiLogoff), the
decimal places on DBgrids and DBedits do disappear (values begin to be
retrieved TRUNCATED):
0.01 becomes 0.00, 1.55 becomes 1 and so on.
During this process, there are 3 DLLs being loaded (2 from Pragnaan
and 1 from MAPI services I presume):
CONTAB32.DLL load
ROUT66AB.DLL load
IMM32.DL load
CONTAB32.DLL unload
ROUT66AB.DLL unload
The only way to see the decimal places is to close the program and
reexecute it!
Has anyone experienced such a strange situation like this?
You can e-mail me directly to psilva-@-no-spam-soporcel.pt after
removing the dashes and the no spam part on this e-mail.
THX in advance for any help on this.
P.Silva
|
|
| Back to top |
|
 |
Jeremy Collins Guest
|
Posted: Tue Sep 02, 2003 4:42 pm Post subject: Re: Decimal Places Disappearing (literally!) |
|
|
P.S. wrote:
| Quote: | THE PROBLEM IS:
The decimal places are correctly stored on the DB server. The 2
relevant decimal places appear on DBgrids and DBedits correctly.
After I preview the report (QR 3.0. and press a button wich exports
the report to PDF (via Pragnaan export filters) and sends an e-mail
(via MAPI services, MapiLogon, MapiSendMail and MapiLogoff), the
decimal places on DBgrids and DBedits do disappear (values begin to be
retrieved TRUNCATED):
0.01 becomes 0.00, 1.55 becomes 1 and so on.
|
I guess something is making the grids display ints rather than floats,
either by changing the column DisplayFormat or spoofing the underlying
data type.
You need to break your code down piece by piece until you get the
smallest possible chunk that still exhibits the bug. Right know you
don't even know if it's the "report" code or the "MAPI" code which
is causing the bug.
I'm 99% sure you'll find it's a simple mistake and you'll slap yourself
acoss the head for it ;-)
--
jc
Remove the -not from email
|
|
| Back to top |
|
 |
P.S. Guest
|
Posted: Wed Sep 03, 2003 9:19 am Post subject: Re: Decimal Places Disappearing (literally!) |
|
|
Jeremy Collins <jd.collins (AT) ntlworld-not (DOT) com> wrote
| Quote: | P.S. wrote:
THE PROBLEM IS:
The decimal places are correctly stored on the DB server. The 2
relevant decimal places appear on DBgrids and DBedits correctly.
After I preview the report (QR 3.0. and press a button wich exports
the report to PDF (via Pragnaan export filters) and sends an e-mail
(via MAPI services, MapiLogon, MapiSendMail and MapiLogoff), the
decimal places on DBgrids and DBedits do disappear (values begin to be
retrieved TRUNCATED):
0.01 becomes 0.00, 1.55 becomes 1 and so on.
I guess something is making the grids display ints rather than floats,
either by changing the column DisplayFormat or spoofing the underlying
data type.
(...)
I'm 99% sure you'll find it's a simple mistake and you'll slap yourself
acoss the head for it
|
I hope so, because debugging via assembly can be the next step to
go!...
The problem is that I'm pretty sure that it's not a display problem.
Values on "SQL monitor" already come truncated (Precision = 2 but 0.01
comes 0.00 and is shown on grids as "0.00"). The problem seems to
arise from the client part of Informix (or the SQL Link SQLINF32.DLL)
but I'm running out of ideas. This happens when the outlook "choose
profile" dialog appears. If this dialog fails to appear the problem
won't arise. If the dialog appears and is cancelled the problem
happens. I guess I'll follow your advice (break code or reproduce code
on an empty program).
Thx for your feedback.
P. Silva
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|