Question

I am no ASP-coder, but our client have an old ASP site, that they use internally.

It have recently been moved to a new server and that have caused some problems.

I a form you can input some measurements, f.x. 8,6 but when it is returned from a ASP script the comma is removed, so 8,6 have become 86

I have narrowed it down, to about this:

set rs1 = Server.CreateObject("ADODB.Recordset")

and after this:

sql1 = "SELECT * FROM husdel WHERE id = " & Session("husdelid")
rs1.open sql1, conn, 3, 3

If I do response.Write(rs1("l")) it will output "86", but if I do Response.Write(request.form("l")) it will output "8,6" where l is the name of the input field in the form.

Was it helpful?

Solution

I am not sure if this a the correct fix, but it seems to work.

replace(request.form("l"), ",", ".")

was used to replace a comma with a dot, but that was messing up the look in the database as numbers is comma separated.

Changing it to replace(request.form("l"), ".", ",") seems to have fixed it - for now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top