Hi everyone!
I hope you could help me!
In my access database, I have numeric fields with decimals, and when I try to pass a value from ASP to any of these fields the decimal part is rounded, why?
Here is the example code:
<%
wCuota = Trim(Request.Form("Cuota"
)
Set oConn = Server.CreateObject ("ADODB.Connection"
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("../datos/datos.mdb"
Set RS = Server.CreateObject ("ADODB.RecordSet"
sql = "SELECT * from afiliado where afiliado = 178"
RS.Open sql, oConn , 2, 3
RS("cuota_vista"
= wCuota
RS.Update
Response.Write "Value of my Variable:" & wCuota
Response.Write "Value of my Field: " & RS("cuota_vista"
%>
The result is something like this:
Value of my Variable:15.75
Value of my Field: 16
The data type in the access field is numeric.
I don't know why, and I've searching about it, but I can't find an answer yet.
Thanks in advance.
Elizabeth
I hope you could help me!
In my access database, I have numeric fields with decimals, and when I try to pass a value from ASP to any of these fields the decimal part is rounded, why?
Here is the example code:
<%
wCuota = Trim(Request.Form("Cuota"
Set oConn = Server.CreateObject ("ADODB.Connection"
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source="& Server.MapPath("../datos/datos.mdb"
Set RS = Server.CreateObject ("ADODB.RecordSet"
sql = "SELECT * from afiliado where afiliado = 178"
RS.Open sql, oConn , 2, 3
RS("cuota_vista"
RS.Update
Response.Write "Value of my Variable:" & wCuota
Response.Write "Value of my Field: " & RS("cuota_vista"
%>
The result is something like this:
Value of my Variable:15.75
Value of my Field: 16
The data type in the access field is numeric.
I don't know why, and I've searching about it, but I can't find an answer yet.
Thanks in advance.
Elizabeth