Results 1 to 9 of 9

Thread: Embedded SQL returns .00 instead of 0.00

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Somewhere in Vermont, USA - unless I'm not

    Default Embedded SQL returns .00 instead of 0.00

    This may be the wrong forum as I'm running this in Windows. Please move it if that's best.

    20.1, MSSQL 2019, DAW Driver running on a Win10 machine. 20.1 & Driver are installed from the latest installer.

    I've created a little view to add to an OE workspace that's been converted to MS SQL. I edited 2 order detail records to make the price 0 (first 2 lines of Order # 101) & get the values with a very complex query... Put a breakpoint on the info_box & check the values for saResults in the locals pane.

    If I run that in SSMS, the zero prices are returned as 0.00. If I run this with the attached code, it returns .00 (no leading zero). I discovered this when populating a DR directly from the returned array (Move saResults[iRow][7] to vData[iRow][7]) & DR does not like it at all. For sure I can add code to fix it, but shouldn't embedded SQ return 0.00? Note that I may well be doing something wrong. DF handles zero #'s returned this way, so maybe it's an issue with DR?


    Click image for larger version. 

Name:	Zero.JPG 
Views:	30 
Size:	20.6 KB 
ID:	15656


    The following makes DR happy:

                                    Move saResults[iRow][7]  to nNumber
                                    Move nNumber             to vData[iRow][7] // Name: Concentration, Length: 4, Precision: 1, Datatype: Number
    Last edited by Garret Mott; 10-Sep-2022 at 09:38 AM.

    Your shadow is confirmation that light has traveled nearly 93 million miles unobstructed, only to be deprived of reaching the ground in the last few feet thanks to you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts