I am publishing an application using VS2012 that connects and reads data from a local MDB file. The application runs fine in Windows 7; however, when I attempt to run it in XP I get an unhandled exception.
I have looked around on here and found a couple pages in regards to this; however, I guess I am not understanding what the actual cause is. I copied the page that I have found to be the most relevant but not sure how to implement it in my model.
Sequence contains no elements?
Below is the code that I am using to query the DB. Any suggestions on what I could be doing wrong?
conection.Open();
var query = "select t_id From t_user where u_company='"+profselect.Text+"'";
var command = new System.Data.OleDb.OleDbCommand(query, conection);
var reader = command.ExecuteReader();
string blah=(reader[0].ToString());
textBox1.Text = blah;
reader.Close();
conection.Close();