Print Page | Close Window

Databse - ASP str" command help needed

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=8977
Printed Date: 07 April 2026 at 1:29pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Databse - ASP str" command help needed
Posted By: cheops@collecto
Subject: Databse - ASP str" command help needed
Date Posted: 16 January 2004 at 10:16am

Hallo

 

I´m in the process of changing the tables in the WWF.mdb

i´m new to asp and Access.

My question is if I want to change the tables names of username to: intAccessUserName

and password to:
intAccessUserPassword

What do I have to change the code below to in order to make it work ?
(i´m unsure about this "strUsername" and "strPassword" command

 

'Read in the users details from the form
strUsername = Trim(Mid(Request.Form("name"), 1, 15))
strPassword = LCase(Trim(Mid(Request.Form("password"), 1, 15)))
blnAutoLogin = CBool(Request.Form("AutoLogin"))


'Take out parts of the username that are not permitted
strUsername = Replace(strUsername, "password", "", 1, -1, 1)
strUsername = Replace(strUsername, "salt", "", 1, -1, 1)
strUsername = Replace(strUsername, "author", "", 1, -1, 1)
strUsername = Replace(strUsername, "code", "", 1, -1, 1)
strUsername = Replace(strUsername, "username", "", 1, -1, 1)

and what does the str command stand for ?

Please help me out on this one, this is the only thing I need to complete the remaning of my tables (I think!)

Regards Cheops




Replies:
Posted By: gavinc
Date Posted: 16 January 2004 at 10:36am

Sorry if I'm being a bit dense here but why are you making these changes?

strusername and strpassword are just variables, not asp commands.

 



Posted By: cheops@collecto
Date Posted: 16 January 2004 at 10:46am
Originally posted by gavinc gavinc wrote:

Sorry if I'm being a bit dense here but why are you making these changes?

strusername and strpassword are just variables, not asp commands.

 



I´m making those changes in order to incorporate WWF forum to my running CMS system. 

And I´m asking couse i´m unsure if I need to rename those variables in order to make the complete database fusion....



-------------
Sorry for my bad 3nglish..!!


Posted By: gavinc
Date Posted: 16 January 2004 at 10:53am

The code that you've mentioned in your original post won't need changing if you change the column names on the database.

What you need to be careful of is to change anything that looks like rsCommon.Fields("username") to rsCommon.Fields("intAccessUserName"). Do the same as well for the password column.

 



Posted By: WebWiz-Bruce
Date Posted: 16 January 2004 at 10:55am
I don't think what you are trying will work.

The database is a relational database so any users posting in the forum needs an entry in the tblAuthors table to relate the post and other fetaures in the forum to. Without this entry the forum will not run.


-------------
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: cheops@collecto
Date Posted: 16 January 2004 at 11:00am

I know that I have changed all tables setting in and for database.

I only need to know if I need to change those variables !

and what they do and what the str command stand for ?

 



-------------
Sorry for my bad 3nglish..!!


Posted By: WebWiz-Bruce
Date Posted: 16 January 2004 at 11:07am
What you are proposing would not work, changing the name of the variables would mean finding every instenace of the variable within the code and changing it.


-------------
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: cheops@collecto
Date Posted: 16 January 2004 at 11:17am

I know - I know - And that’s just what I’m doing right now...

I only need to know this last thing about the "str" command

but okay - let me try to ask another way -

What does the line strUsername do in those lines:

'Read in the users details from the form
strUsername = Trim(Mid(Request.Form("name"), 1, 15))
strPassword = LCase(Trim(Mid(Request.Form("password"), 1, 15)))
blnAutoLogin = CBool(Request.Form("AutoLogin"))


'Take out parts of the username that are not permitted
strUsername = Replace(strUsername, "password", "", 1, -1, 1)
strUsername = Replace(strUsername, "salt", "", 1, -1, 1)
strUsername = Replace(strUsername, "author", "", 1, -1, 1)
strUsername = Replace(strUsername, "code", "", 1, -1, 1)
strUsername = Replace(strUsername, "username", "", 1, -1, 1)

I have not yet tested the changes - I’m changing the name of the variables for every instance of the variable within the code and changing it right now .



-------------
Sorry for my bad 3nglish..!!


Posted By: WebWiz-Bruce
Date Posted: 16 January 2004 at 11:33am
strUsername in that line is the name of the variable that stores the persons username throughout the forum code.

str is not an ASP command, all the str part of the variable is something I put in as I use this as part of my naming convention when programming so I know what datatype the variable contains.

I use the following naming conventions in my code for variables:-

str = string
int = interger
lng = long interger
dbl = double
bln = booleon
dtm = date
cur = currency
etc.

These are not commands just something I simply place in to help me when I am coding.


-------------
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: cheops@collecto
Date Posted: 16 January 2004 at 11:48am

OKAY thanks -boRg- for you r answer..


Is it then right of me to understand, that I don’t have to change that part of the code.. or am I wrong…



-------------
Sorry for my bad 3nglish..!!


Posted By: WebWiz-Bruce
Date Posted: 16 January 2004 at 12:12pm
I've still not owrked out what you are doing.

Your best bet is give it ago and see if it works, if it doesn't mess with it somemore till it does.


-------------
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



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