Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBScript case sensitive ?

Status
Not open for further replies.

DKL01

Programmer
Sep 14, 2000
233
US
Hi,

Is VB script case sensitive ? If I enter "SAP" in the password field in logon screen it works. If I enter "sap" it won't. In database the password is stored as "SAP"

Page1.asp
-----------

<%@ Language=VBScript %>

<%

Dim userid
Dim password
Dim conn
Dim SQL
dim RS

userid = request(&quot;userid&quot;)
password = request(&quot;password&quot;)

Set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.Open Application(&quot;ConnectionString&quot;)
session(&quot;Connection&quot;) = conn

set RS = Server.Createobject(&quot;ADODB.Recordset&quot;)
SQL = &quot;EXEC spValidateUser &quot; + userid
RS.Open SQL, conn


if RS(0)= password then
Response.Redirect(&quot;AddMember.asp&quot;)
else
Response.write(&quot;Invalid password&quot;)
end if


%>
 
Yes, string compares in VB are case sensitive.

to convert a string to uppercase use the UCASE() function, lowercase is LCASE()

password = UCASE(request(&quot;password&quot;)) .
.. Eat, think and be merry .
... ....................... .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top