on 06-27-2016 8:12 AM
How do you get the value?
--> you have to use u_dw.GetItemDecimal(... (not GetItemNumber)
--> store the value in a dec-Variable (not an integer)
Best regards
Heiko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan;
FWIW: there were a lot of issues with PB 12.0 GA release. I would first of all strongly suggest that you upgrade PB to at least v12.1 build 6518.
The next issue might be related to your DBMS connection mechanism vs PB's DataWindow. Can you tell us the settings you have in your PB IDE/Application?
ie: SQLCA.DBMS = "????"
SQLCA.DBPARM = "????"
etc.
Also, what is the column definition in your DB table(s) that is holding the decimal value?
Regards ... Chris
Hi Ryan,
Looking at your column Specification settings, I would suggest you to use the value 2 instead of 10 in the Decimal column. Indeed, this column figure out the number of digit used after the decimal separator (the scale), not its precision. For example, if you use a DEC(15,3) at dbms level, you will see 3 in the decimal column not 15 in the Column Specification view of the DW.
You can't see the precision in PB as it use the maximum value allowed that is 28 digits.
Then I will suggest you to check what decimal separator you're currently using :
- on your PC, see Regional Setting in the control panel
- on the Transaction Tab page of your DbProfile used
They should both match to avoid any side effect.
At the end, follow the advice of Chris and update to last stable version/build of PB.
Hi Ryan;
I just set up a test to emulate yours, as follows:
1) Create an Insert SP ...
2) Create a SP DW ....
This is where your DW seems to be wrong
3) Map the insert SP to the SP based DW ...
4) Use DW's "preview" pane to test ...
- inserted a new insert row (2x)
- added value for each row
- pressed update icon on DW's toolbar
- pressed retrieve icon
(Retrieve & insert SP's worked as expected).
HTH
Regards ... Chris
Hi Ricardo,
1 .
CREATE PROCEDURE [dbo].[get_mf_ded]
-- Add the parameters for the stored procedure here
@srch_empid char(7)
AS
BEGIN
SET NOCOUNT ON;
SELECT empid, ded_code, ded_desc, ded_amount,
datefrom, dateto, entrydate, entryby, no_of_months from dbo.tbl_mf_ded where empid = @srch_empid
END
2.
Yes, it is truncated.
I tried to show the amount right before I save it in a table using a messagebox. The messagebox shows the exact amount(with decimal). But when saved in the table it becomes rounded off.
But if I manually execute it a DB Painter, it is working fine.
TIA,
"I'm using editmask control with MaskDataType as decimalmask!"
I'm curious why you are using an EditMask control instead of the DW control to input the value. The purpose of the SP Update DW should be to input values directly to the DW and issue an update which would execute the insert SP with the corresponding argument, shouldn't it?
So how it is that you pass the value from the EditMask control to the DW and execute the SP?
1) How is the variable ded_amount defined? It should be something like the following:
Decimal{2} ded_amount
ded_amount = dec(em_1.text)
2) How do you pass the variable to the sp? The correct procedure would be:
declare InsertMfDed procedure for insert_mf_ded @ded_amount = :ded_amount
using SQLCA;
execute InsertMfDed;
Note that this mechanisms makes no use of the SP Insert DW...
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.