problem with decimal column

Results 1 to 3 of 3

Thread: problem with decimal column

  1. #1
    Molly Liu Guest

    Default problem with decimal column

    Hi,<BR><BR>I got problem when try to read a decimal column from RecordSet: <BR><BR>Response object error &#039ASP 0101 : 80070057&#039 <BR>Unexpected error <BR>/wb_or1/login.asp, line 124 <BR>The function returned &#124. <BR><BR>The code on line 124 is:<BR><BR>Response.write MyRecordSet("balance")<BR><BR>The database is Informix.<BR><BR>It has no problem when column type is integer, but I can not use integer for balance.<BR><BR>Can anyone help on this? Thanks in advance.

  2. #2
    Join Date
    Dec 1969
    Posts
    1,013

    Default RE: problem with decimal column

    Have you tried explicitly converting the value? For example, try:<BR><BR>Response.write CStr(MyRecordSet("balance")) <BR>or <BR>Response.write CDbl(MyRecordSet("balance"))<BR><BR>This may help depending on what you are trying to do.<BR>

  3. #3
    Molly Liu Guest

    Default RE: problem with decimal column

    Thanks Chris.<BR><BR>I tried CStr(MyRecordSet("balance")) and CDbl(MyRecordSet("balance")) and got the error below:<BR><BR>Microsoft VBScript runtime error &#039 800a0005&#039 <BR>Invalid procedure call or argument: &#039CDbl&#039 <BR><BR>The interesting thing is that everything is ok when the last integer digit of balance value is none zero. For example, it is ok with balance value 472.00, 57.20, 501.00, but error with 500.00, 10.00, ext.

Posting Permissions

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