An attempt to attach an auto-named database failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I used fwad randomly. Is that supposed to mean something? It says that is the error. Please help, I don't understand c# jargon well so in depth answers would be a major +1
private void label2_Click(object sender, EventArgs e)
{
}
private void loginpage_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
SqlConnection sqlcon = new SqlConnection(@"clearedonpurpose");
string query = "Select * from Table Where username = '" + textBox1.Text.Trim() + "' and password = '" + textBox2.Text.Trim() + "'";
SqlDataAdapter fwad = new SqlDataAdapter(query, sqlcon);
DataTable Table = new DataTable();
fwad.Fill(Table);
if (Table.Rows.Count == 1)
{
Form1 objFrmMain = new Form1();
this.Hide();
objFrmMain.Show();
}
else
{
MessageBox.Show("Wrong!");
}
}
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
}