Classic ASP Insert, Update or delete Form 2 issues.

Job ID: 35954813

Budget: €8 – €30 EUR

Hi,

Two issues:

ISSUE #1:

About MSSQL database... and classic ASP...

I have a issue by a webpage Form insert or update a numeric value with a comma.

In Microsoft SQL Server Management Studio I can put nummeric (field as decimal(18, 3)) values with a comma. like "14,3" or even "14,344" No problem. It stores this value in database correct.

By insert or update trough my webpage Form the database refuse the comma!
It will only accept "14.3" or "14.344". And write it good as "14,3" or "14,344"

When I set in the form the nummeric value separated with a point "." then it's writing the value correct with a comma separated value in my database.

How can I solve this out?

It's must be normal like by putting "14,3" or "14,333" and write it correct in the table field... with the comma.

I do not allow FTP or Database access.

This is my actual code from textfield in insert or update form:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

<input name="inflation" type="text" class="tekstveld" id="inflation" value="<%= RecordsetUser.Fields.Item("inflatie").Value)" />

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

I need only (I think) a snippet of code in my webpage.

BTW:
It's not possible to change the collation from the database cause I use it for years for other projects.



ISSUE #2:

It seems that update, insert or delete form my sessions kill's!

By submit form (POST) the update works (dispute issue with comma issue#1).

So i must pass a variable in to GET but that doesn't work.
Ik try now to go back to POST but I must
add session variable to MM_redirect URL

This is a the piece code where the redirect URL is written.

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
<%
' *** Update Record: set variables

If (CStr(Request("MM_update")) = "form200" And CStr(Request("MM_recordId")) <> "") Then

MM_editConnection = MM_mainconnect_STRING
MM_editTable = "dbo.LGTBL_LOGIN"
MM_editColumn = "ID"
MM_recordId = "" + Request.Form("MM_recordId") + ""
MM_editRedirectUrl = "bounce2.asp" & "?dc=" & ""Session("dc")""
MM_fieldsStr = "btwtarief|value|inflation|value|korting|value"
MM_columnsStr = "btwtarief|none,none,NULL|inflatie|none,none,NULL|korting|none,none,NULL"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

It's give me a error:

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/financial.asp, line 48

MM_editRedirectUrl = "bounce2.asp" & "?dc=" & ""Session("dc")""
------------------------------------------------^

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Thanks in advance.
Related categories: ASP SQL