hi, i'm doing doing a proj that require user to login to the system.
i'm using
Vb.net 2005 and SQL Server 2005 as my database.
login information are suppose to be verify from the table in the server. can any1 give me an example or comments how can i do it?
Dim conn As SqlConnection
Dim cmdLogin As New SqlCommand
Dim daLogin As New SqlDataAdapter
Dim dsLogin As New DataSet
Dim dtLogin As New DataTable
conn = New SqlConnection("Server=" & ServName & "; Database=EISTUDFD; User ID=" & ServUID & " ; Password=" & ServPasswd & ";")
conn.Open()
cmdLogon = conn.CreateCommand
cmdLogon.CommandText = "Select Username,Password,from Login where Username = '" & Trim(txt_UserName.Text) & "' and Password = '" & Trim(txt_Password.Text) & "'"
daLogon.SelectCommand = cmdLogin