Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Databse - ASP str" command help needed
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Databse - ASP str" command help needed

 Post Reply Post Reply Page  12>
Author
cheops@collecto View Drop Down
Groupie
Groupie


Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote cheops@collecto Quote  Post ReplyReply Direct Link To This Post Topic: Databse - ASP str" command help needed
    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



Edited by cheops@collecto
Back to Top
gavinc View Drop Down
Newbie
Newbie


Joined: 20 November 2003
Location: Wales
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinc Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
cheops@collecto View Drop Down
Groupie
Groupie


Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote cheops@collecto Quote  Post ReplyReply Direct Link To This Post 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....



Edited by cheops@collecto
Sorry for my bad 3nglish..!!
Back to Top
gavinc View Drop Down
Newbie
Newbie


Joined: 20 November 2003
Location: Wales
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote gavinc Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cheops@collecto View Drop Down
Groupie
Groupie


Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote cheops@collecto Quote  Post ReplyReply Direct Link To This Post 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..!!
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
cheops@collecto View Drop Down
Groupie
Groupie


Joined: 14 January 2004
Location: Denmark
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote cheops@collecto Quote  Post ReplyReply Direct Link To This Post 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..!!
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.