|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
VBScript - General - Question - Getting Funky A's with database edits
Greetings,
I am looking for possible with help. We have an old ASP web application that we migrated from a NT server to Windows 2003. This is a simple application to update a Access database and then generate some HTML. This is used for our news releases for our company website. We've discovered that when we go back into an article to make changes (edit mode) and re-save, it will add extra characters to the database. Mostly the encoding seems to be saving incorrectly in the database. This works fine it add mode, but for some reason the encoding gets messed up when resaving back to the database. We've tried adding encoding to the top of the application pages, changing from both iso to adt-8 and with no luck. We're not sure if this is a server issue and a setting that needs to be changed on the server, or something that needs to be changed in the database. Any help or direction with this is appreciated. We would like to get this application running correctly again on the new server. |
|
#2
|
||||
|
||||
|
Hi, and welcome to the forums. Its curious that adding a record works correctly and you only get the problem when editing a record. Are you doing anything different for the edit, eg using a different editor component? Any chance you could post some code to show us how you are performing the edit.
Also, does this happen for a number of fields or does it just happen for certain fields? And does it happen for every edit or just sometimes? I had a similar problem when I migrated an application to a new server and it happened when I encrypted passwords, the extended character set on the new server gave me additional characters which didn't exist before and a number of passwords no longer matched. |
|
#3
|
|||
|
|||
|
Quote:
This only happens for the text field in the Access Database. Insert is fine, update seems to cause problems. A copy of the code is below. Code:
Dim ObjRS, strSQL
strSQL="Select * From articles WHERE id=" & request.form("id")
Set objRS = Server.CreateObject("ADODB.Recordset")
ObjRS.Open "articles", objConn, , adLockOptimistic, adCmdTable
objRS.Filter = "id= " & request.Form("id")
'objRS.AddNew
objRS("Title") = Request.Form("title")
objRS("Description") = Request.Form("Description")
objRS("Body") = Request.Form("body")
objRS("leadZeroDate") = Request.Form("date")
objRS("stdDate") = Request.Form("date")
objRS("lastEditDate") = date()
objRS("editedBy") = Request.Cookies("newsadmin")("username")
'objRS("Type") = Request.Form("Type")
If ObjRS("Type") = "news" OR objRS("type") = "finance" Then
objRS("body") = Request.Form("body")
Else
objRS("Url") = Request.Form("url")
End If
objRS.Update
|
|
#4
|
||||
|
||||
|
Which exact field is it, and does it happen every time or is it only under certain cicumstances?
|
|
#5
|
|||
|
|||
|
Quote:
Happens everytime, in fact if I save the edit and save it again I get TWO funky characters. It just does not like carriage returns for some reason in edit. The encoding somewhere is not set properly either on the server or from within ASP classic. The field is the 'body' field which is a textarea field on the form and an text field in the database (aka unlimited characters) |
![]() |
| Viewing: ASP Free Forums > Programming > ASP Development > VBScript - General - Question - Getting Funky A's with database edits |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|