The bottom line is the first time I work with C # and the Microsoft Access database file. There are no errors, but causes class exceptions. Please review the code, it is not great. And poke where wrong.
class DB { static string connectionString = "provider=Microsoft.Jet.OLEDB.4.0;" + "datasource=Kursach.mdb"; static OleDbConnection myOleDbConnection = new OleDbConnection(connectionString); static OleDbCommand myOleDbCommand = myOleDbConnection.CreateCommand(); static OleDbDataReader myOleDbDataReader = myOleDbCommand.ExecuteReader(); public string sql_query(string query, string row) { myOleDbCommand.CommandText = query; myOleDbConnection.Open(); myOleDbDataReader.Read(); return myOleDbDataReader[""] + row; } }