Good, you see I am creating a login in visual studio using SQL Server Compact but I do not know how to obtain the data resulting from the sentence and compare them, I have this:
Dim sqlcon As New SqlCeConnection("Data Source=C:\Usuarios.sdf; Persist Security Info=False;") Dim sqlcmd As New SqlCeCommand() Try Dim sqltext As String sqltext = "Select * from Usuarios where Nombre = '" & TextBox1.Text & "' and Contra = '" + TextBox2.Text + "'" sqlcmd.CommandText = sqltext sqlcmd.Connection = sqlcon sqlcon.Open() sqlcmd.ExecuteNonQuery() sqlcon.Close() Catch ex As Exception MsgBox(ex.Message) End Try
It's the first time I use it and I'm a little green, I hope you can help me. Basically what I want to do is if a record has been found, that is, True, access another Form. Greetings.