Hi everyone,

I have this select statement which works intermittently.
I'm using it to change reset the user password if they have forgotten it, however sometimes it shows that the password was reset and other times it says that the email address wasn't found in the database. This happens for the exact same email address which is definitely in the database.

[

strSQL = "SELECT broker_id, firstname, lastname FROM login_table WHERE email_address = '" & trim(Request.Form("email_address")) & "'"
set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, con, 1

]

Any ideas? I'd appreciate any suggestions.


Cheers,

Recommended Answers

All 2 Replies

Hi,
have you tried to make the compare with either lcase or ucase of both items?

The sql would look like this

strSQL = "SELECT broker_id, firstname, lastname FROM login_table WHERE trim(lcase(email_address)) = '" & trim(LCase(Request.Form("email_address"))) & "'"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.