this code in
FORMAT OF THE INITIALIZATION STRING DOES NOT CONFORM TO SPECIFICATION STARTING AT 0Code:Dim conn As New SqlClient.SqlConnection("select * from tb_comp_login", conn) Dim SQL As String SQL = "SELECT comp_password " SQL &= "FROM tb_comp_login " SQL &= "WHERE comp_username = @comp_username " Dim Comm As New SqlClient.SqlCommand(SQL, conn) Dim Param As New SqlClient.SqlParameter("@comp_username", SqlDbType.VarChar) Param.Direction = ParameterDirection.Input Param.Value = Username Comm.Parameters.Add(Param) Dim da As New SqlClient.SqlDataAdapter(Comm) Dim dt As New DataTable da.Fill(dt) conn.Close() conn.Dispose() Dim Validated As Boolean If dt.Rows.Count > 0 Then Validated = (dt.Rows.Item(0).Item("Password").ToString = Username) End If Return Validated
the problem line seems to be dim conn as new sqlclient.sqlconnection("select..
where should i set up my connection to the databse as this connects to the table




Reply With Quote