ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old November 3rd, 2009, 04:14 PM
ironhide1975 ironhide1975 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 3 ironhide1975 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 15 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old November 4th, 2009, 03:20 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
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.

Reply With Quote
  #3  
Old November 5th, 2009, 01:06 PM
ironhide1975 ironhide1975 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 3 ironhide1975 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 15 sec
Reputation Power: 0
Quote:
Originally Posted by sync_or_swim
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.


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

Reply With Quote
  #4  
Old November 6th, 2009, 07:27 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,461 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 1 Day 16 h 50 m 26 sec
Reputation Power: 1806
Which exact field is it, and does it happen every time or is it only under certain cicumstances?

Reply With Quote
  #5  
Old November 9th, 2009, 08:29 AM
ironhide1975 ironhide1975 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 3 ironhide1975 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 15 sec
Reputation Power: 0
Quote:
Originally Posted by sync_or_swim
Which exact field is it, and does it happen every time or is it only under certain cicumstances?


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)

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > VBScript - General - Question - Getting Funky A's with database edits


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek