using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace WindowsFormsApplication_toLogIn
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnLogIn_Click(object sender, EventArgs e)
{
SqlConnection cnn = new SqlConnection("Your connection string");
SqlDataAdapter da = new SqlDataAdapter("SELECT user, pass FROM yourTable WHERE user='" + txtUser.Text + "' and pass='" + txtPass.Text + "'", cnn);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables["yourTable"].Rows.Count > 0)
{
}
else
{
}
}
}
}