I have an interesting problem. The data on our Sybase server has $10 or $90 (even numbers of 10, below $100) in a money field. But, when ADO returns it--it's result is $1, or $9 (or whatever the number is).
I've never seen this before. Does anyone know why this is happening? It doesn't happen on any other amounts, just even numbers of 10, below $100. It doesn't happen on any other money fields either.
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
I've never seen this before. Does anyone know why this is happening? It doesn't happen on any other amounts, just even numbers of 10, below $100. It doesn't happen on any other money fields either.
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