Hi there,
Im getting the error above, when i run my code.
string myCommand = "SELECT * FROM Manager WHERE UserName=" + ID;
SqlDataAdapter da = new SqlDataAdapter(myCommand, con);
DataSet ds = new DataSet();
try
{
con.Open();
da.Fill(ds); [B]// <- highlighting this part of the code..[/B]
}
finally
{
con.Close();
}
foreach (DataRow dr in ds.Tables[0].Rows)
{
txtUserName.Text = dr[1].ToString();
}
}
}
All i want to do is query the MS SQL database for data and extract row by row into an HTML table. This has proven to be a real pain in the neck. This simple function is sooo easy with PHP.
Please let me know if im on the right track, or if you can help with my error, i appreciate your help!
Thanks!