Print Page | Close Window

Wierd thing with quotes, advice please

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9361
Printed Date: 07 April 2026 at 9:49pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Wierd thing with quotes, advice please
Posted By: mikebj
Subject: Wierd thing with quotes, advice please
Date Posted: 29 January 2004 at 12:32pm

Hi Support,

If a person post a reply wit a quote, and the name on that quote is like [aaa] Frank, then it truncate it like this in the quote, [aaa wrote

and then the quote text starts with ] Frank.

I understand that it's because it does not like the space, but how do I repair it to do so, i.e check for start and end of name.

Any help would be greatly appreciated

Cheers

Mike




Replies:
Posted By: Semikolon
Date Posted: 29 January 2004 at 12:36pm
its not the space.. its the [ and ]


Posted By: WebWiz-Bruce
Date Posted: 29 January 2004 at 12:40pm
New versions won't allow things like [ or ] in usernames to prevent this type of thing.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: mikebj
Date Posted: 29 January 2004 at 1:37pm

Thank you for your quick response, I understand what you are saying.

Now how do I go about changing the names without deleating the users and re create them again.

I don't want them to loose connection to their posts, I've tried to install Maddogs change Usernames in admin mode, but when you try to logon using the new username, it say error in username or password, so I uninstalled that again, any other way.

Btw. using wwf 7.7

Cheers

Mike



Posted By: Semikolon
Date Posted: 29 January 2004 at 1:47pm

run this script one time for each username if you use sql server

<%
Dim adoCon
Dim strSQL
Dim rsCommon

Const strDbTable = "tbl"

Const strSQLServerName = "dataenmin"
Const strSQLDBUserName = "sa
Const strSQLDBPassword = "sapw"
Const strSQLDBName = "WebWizForums"

Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "Provider=SQLOLEDB;Server=" & strSQLServerName & ";User ID=" & strSQLDBUserName & ";Password=" & strSQLDBPassword & ";Database=" & strSQLDBName & ";"

Set rsCommon = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT Username, User_code FROM " & strDbTable & "Author WHERE Username = 'Old username';"

rsCommon.CursorType = 2

rsCommon.LockType = 3

rsCommon.Open strSQL, adoCon

rsCommon.Fields("Username") = "New Username"
rsCommon.Fields("User_code") = "New Usercode"

rsCommon.Update

rsCommon.Close
Set rsCommon = Nothing
Set adoCon = Nothing

Response.Write("Username Updated!")
%>

and this if you use access

]<%
Dim adoCon
Dim strSQL
Dim rsCommon

Const strDbTable = "tbl"

Set adoCon = Server.CreateObject("ADODB.Connection")

adoCon.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & strDbPathAndName

Set rsCommon = Server.CreateObject("ADODB.Recordset")

strSQL = "SELECT Username, User_code FROM " & strDbTable & "Author WHERE Username = 'Old username';"

rsCommon.CursorType = 2

rsCommon.LockType = 3

rsCommon.Open strSQL, adoCon

rsCommon.Fields("Username") = "New Username"
rsCommon.Fields("User_code") = "New Usercode"

rsCommon.Update

rsCommon.Close
Set rsCommon = Nothing
Set adoCon = Nothing

Response.Write("Username Updated!")
%>

change the things in red



Posted By: mikebj
Date Posted: 29 January 2004 at 3:34pm

If I understand this correctly, this will change the username AND the
password right?

cheers

Mike



Posted By: Semikolon
Date Posted: 29 January 2004 at 3:37pm
no.. usercode


Posted By: mikebj
Date Posted: 29 January 2004 at 4:34pm

Simen,

Thank you for your help, I understand now (looked at the database).

Cheers

Mike




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net