Skip to main content

Search

Search

Locale Issues When Using A Vb Script

Comments

5 comments

  • Avatar
    Michael Toupin (mtoupin

    We'd need to see the whole script to get an idea of what the issue could be.  Please attach the label format here so we can have a look at it.

    0
  • Avatar
    Legacy Poster

    Good idea. Here it is :)

    Sample data is less then one thousand in this file.


    VB script is simply value=value*"1.25" 

    0
  • Avatar
    Michael Toupin (mtoupin

    I'd do it:

     

    Value = Cint(value) * 1.25

     

    Make sure that the value is an integer, and use the 1.25 as an integer instead of a string.

    0
  • Avatar
    Legacy Poster

    Oh, yeah, thanks. It does change the way it reads the value from db. But it doesnt give me the right value, nor does it print. It gives me an error message: Type missmatch 'Cint' 

    Attached scrn

    Any idea whats going on?

     

    Is there any way to ad a *1.25 directly to the sql statement instead so I dont have to do VB scripts for haps?

    But it still reads the data wrong from db.

    values 1 to 999 becomes 100.00 to 99900.00 now 

    values 1000 and up becomes 1.00 and up

    0
  • Avatar
    Domingo Rodriguez
    Moderator

    Could you create a sample database (text file, or Microsoft Access) and let us know if you can still reproduce the same behaviour? If yes, please attach the database sample to this topic.

     

    You could also try to make use of the "FormatNumber()" VBScript function to format your number always with the desired amount of decimals. Will this help?

    0

Please sign in to leave a comment.