Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Case sensitive search in Access Database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Case sensitive search in Access Database

 Post Reply Post Reply Page  <123>
Author
vicky_c View Drop Down
Newbie
Newbie


Joined: 14 March 2003
Location: Scotland
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicky_c Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 11:17am
Originally posted by ultramods ultramods wrote:

You could only allow users to have lower case usernames.

For example

username="ULTRAMODS"

RESPONSE.WRITE(LCase(username))

would change username to ultramods

sorry to bother you again but where would this part go?

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 11:29am
You dont need to use that part now.
Back to Top
vicky_c View Drop Down
Newbie
Newbie


Joined: 14 March 2003
Location: Scotland
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicky_c Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 11:35am

I was gonna give it a try cos the otha thing neva worked   it was sayin sumthin about it cant carry out the operation cos it wasn't valid .  So if i just change the log in so that they're all lowercase now then at least it should work from now on and ill deal with the ppl who have the same usernames some other way.

Thanks! 

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 11:40am

you could do. If you are wanting to use the LCase(). You can use it in the next part of server side code that you use, after the user has entered the username.

What error message were you getting.

Back to Top
vicky_c View Drop Down
Newbie
Newbie


Joined: 14 March 2003
Location: Scotland
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicky_c Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 11:51am

Well this is what I had for the full verify page:

____________________________________________________

<%
 'Save the entered username and password
 username = Request.Form("username") 
 password1 = Request.Form("password1")
 
 if username = "" then Response.redirect("empty.asp")
 if password1 = "" then Response.Redirect("empty.asp")
 
 'Build connection with database
 set conn = server.CreateObject ("ADODB.Connection")  
 conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=e:\home\Default\****************************"
 set rs = server.CreateObject ("ADODB.Recordset")  
 rs.Open "SELECT * FROM admin where username='"& username &"' AND password=' " & password " ' ",
 
 
 IF not rs.EOF  THEN
 Session("name") = rs("fullname")
 

 else
  Resonse.Redirect("login_id.asp")
  
 end if

  rs.Close
  conn.Close
  set rs=nothing
  set conn=nothing

%>

_________________________________________________

And this is the error message I got:

ADODB.Recordset error '800a0e7d'

The connection cannot be used to perform this operation. It is either closed or invalid in this context.

/members/verify.asp, line 13

 

Line 13 is this one:

rs.Open "SELECT * FROM admin where username='"& username &"' AND password1=' " & password1 &" ' "

 

Any idea what went wrong?

Thanks so much for helping me!!

Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 12:24pm

Try:

rs.Open "SELECT * FROM admin where username='"& username &"' AND password1=' " & password1 &" ' ", conn, 3, 3

Back to Top
vicky_c View Drop Down
Newbie
Newbie


Joined: 14 March 2003
Location: Scotland
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote vicky_c Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 12:59pm
No error messages this time.....it just goes to login_id.asp even if its a valid username and password
Back to Top
ultramods View Drop Down
Groupie
Groupie
Avatar

Joined: 08 January 2003
Location: Scotland
Status: Offline
Points: 146
Post Options Post Options   Thanks (0) Thanks(0)   Quote ultramods Quote  Post ReplyReply Direct Link To This Post Posted: 26 April 2003 at 1:20pm

ok. test it by using the following, to see if the variables are being passed the correct data.

RESPONSE.WRITE(username)
RESPONSE.WRITE(password1) 

Also try Trim(Request.Form("username") )

            Trim(Request.Form("password1") )

Back to Top
 Post Reply Post Reply Page  <123>

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.