Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi all.. am doing a small project for doing the student registration and login form.. for this i have to do is, to restrict the username which is already in the database. can anyone please help me in doing this.

thanks in advance...
Posted

use this method:

public Cursor query(....)
 
Share this answer
 
v2
Comments
CRDave1988 13-Feb-12 0:38am    
In more practical approach username should be primary key so it don't allow Duplicate entry and throw Exception.
namasrikanth 13-Feb-12 0:49am    
am not getting you.. actually i am able to search the string and store the values in cursor, then here is my problem in comparing the string with cursor, can you provide me a source code..
CRDave1988 13-Feb-12 0:55am    
see this example http://www.higherpass.com/Android/Tutorials/Accessing-Data-With-Android-Cursors/2/
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900