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
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