Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Selecting data from table by matching case

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2005-06-20 : 07:21:46
Nilesh writes "I select the username and password from table as following

"select * from table where Username = '"& trim(txtusername) &"' and password = '"& trim(txtpassword) &"'"

But data is selected without matching the case.

fo example :

if the username is Nilesh and I enter nilESh, it is selected.

I have number of user in my database so I cannot use following loop to check if the user exsist.

for i=0 to recordset.recordcount
if recordset("Username ") = trim(txtusername)
msgbox "user verified"
end if
recordset.movenext
next

How can I do this without using for loop so that I wiil be able to select username and password by matching case."

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-06-20 : 08:29:35
Refer this
http://sqlteam.com/forums/topic.asp?TOPIC_ID=12526
Do search in this forum. You will find more related topics

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -