While my program was normally running in Visual Studio 2017 I closed it and reopened it and from that moment I am getting the error message "System.Data.OleDb.OleDbException: 'Cannot open any more tables.'" in the line with bold letters. My code is connected to a Microsoft Access database. Can you help me, please? It is for my thesis and I am in a real need for your help.
private void Grid_Loaded(object sender, RoutedEventArgs e) { label.Content = "Ερώτηση " + Question;
var DBPath = System.AppDomain.CurrentDomain.BaseDirectory + "\\Database\\Users.mdb";
conn = new OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + DBPath);
conn.Open();
id = MainWindow.id;
OleDbDataReader dr1 = null;
do
{
rInt = r.Next(1, 20);
cmd = new OleDbCommand("SELECT * FROM TestQuestions WHERE Chapter='Eisagogi' AND ID="+rInt+"; ");
cmd.Connection = conn;
**dr1 = cmd.ExecuteReader();**