Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string connectionString = String.Format(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};", _local_dbname);
- OleDbConnection connection = new OleDbConnection(connectionString);
- try
- {
- connection.Open();
- OleDbCommand command = new OleDbCommand("SELECT * FROM myTable where key = from your variable/memory", connection);
- OleDbDataReader reader = command.ExecuteReader();
- while (reader.Read())
- {
- Console.WriteLine("reading row: " + reader["ID"].ToString());
- }
- reader.Close();
- }
- catch (Exception ex)
- {
- // your exception
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement