Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bizarre Money problem with ADO

Status
Not open for further replies.

sheykc

Programmer
Sep 28, 2001
79
0
0
US
I have an interesting problem. The data on our Sybase server has $10 or $90 (even numbers of 10) in a money field. But, when ADO returns it--it's result is $1, or $9 (or whatever the number is). It's like it's truncating the value, before the decimal point.

I've never seen this before. Does anyone know why this is happening?

I'm using ADO in an ASP page.

Here is a sample of the code:

set oFSCN = Server.CreateObject("ADODB.Connection")
set oFS1 = Server.CreateObject("ADODB.Recordset")

With oFSCN
.Provider = "MSDASQL.1"
.Properties("User ID") = sUserID
.Properties("Password") = sPassword
.Properties("Data Source") = sDataSource
.CursorLocation = 3
.Open
End With

With oFS1
.Source = sHnobjectsDB & "..hnsp_ecp_fsprol01_s '" & cStr(sClaimID) & "'"
.ActiveConnection = oFSCN
.Open
End With

If oFS1.RecordCount > 0 then
For y = 1 to oFS1.RecordCount
Response.Write oFS1.Fields.Item("cdml_chg_amt").Value
Next
oFS1.MoveNext
End If

Returns:
1
21
25
25
13

If I use Query Analyzer and execute the stored procedure, the values in the column are:

10.00
21.00
25.00
25.00
13.00

Any suggestions would be helpful.

Thanks in advance,

Shey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top