Skip to main content

Need help if the user is already exist

Mga bossing nho poh ang codes kung ang username ay already existing at nho poh ang mga restrictions..Kasi poh ung gnwa namin kahit existing na ung username nakakapag add pa din kya nauulit pa gamitin ung username.. Reply nalng poh kayo dito..Sql poh ang databse namin.. Thanks in Advance mga KaSourceCodester.. Salamat...Salamat...Salamat...Salamat...Salamat...
Submitted bycedon Wed, 01/13/2010 - 13:35

jerwin para sayo sir! try mo nga compile to dito nako mag cocodes huh hehehe (palitan mo nalang oledb to sql) 'global declaration dim dr as new oledbdatareader dim cmd as oledbcommand dim sql as string '(lagay mo sa add button) 'assume tbluser = table, username is a field and txtuser is a textbox 'connstring = the connection string sql = "Select * from tblusers WHERE username = '" & txtuser.text & "' cmd = new oledbcommand(sql,connstring) dr = cmd.executereader dr.read If dr.hasrows then msgbox "users already exist!" Else msgbox"allow user to add their username" End if -ced
Submitted byAnonymous (not verified)on Wed, 09/14/2011 - 00:51

gumamit ka nito: if .recordcount 0 then Msgbox "There has an existing username and password",vbexclamation else txka mo ilagay ung code for adding...
Submitted byLynesuson Fri, 09/30/2011 - 22:58

magset ka ng primary key sa username mo dun sa database then eto code if txtusername = (username) then msgbox "Username already exist. Try again.",vbexclamation else (ung code muh para sa add ng username) end if try muh...

mga sir bka nmn matulungan nyo ko pano  po b gumawa ng restriction ng admin and user  n limited lang mggwa bawal po siya mag delete and user natin. salamat

Add new comment