Hi
You can use
SqlDataReader
Read()
method if this method can read reacord with your
selcet
query will be return
True
else
False
.
try
BLL.xpto.Confiruser(txt_user.Text)
If Not BLL.xpto.Confiruser(txt_user.Text) Is Nothing Then
msgbox = "Successful"
end if
SqlDataReader slqdr =
//exemple
// if i insert in a textuser.text="QWERTY"(qwerty exist in my database)then
// the prog return that exist.
// if i insert in a textboxuser.text= "ASD" (doesn
// the prog. return the exact same thing
If BLL.xpto.Confiruser(txt_user.Text)<> text_user.text Then
System.Data.SqlClient.SqlDataReader sqldr = new System.Data.SqlClient.SqlDataReader();
System.Data.SqlClient.SqlCommand sqlcom = new System.Data.SqlClient.SqlCommand("select * from MyTable where name=N'"+text_user.text+"'", sqldbconnection);
sqldr = sqlcom.ExecuteReader();
return sqldr.Read();
Catch ex As Exception
//msg error
end try