For Acces databases (.mdb, .accdb, etc…), you want to use OleDbConnection, not SqlConnection (SQL Server), like this:
conn = new System.Data.OleDb.OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\BC207\test.accdb")
More Related Contents:
- Call the maximum from SQL table to textbox
- Store value in Yes/No field in Access using C#
- OLEDB Parameterized Query
- The ‘Microsoft.ACE.OLEDB.12.0’ provider is not registered on the local machine while data export to MS ACCESS
- How to insert a record into a access table using oledb?
- How to create Microsoft Access database in C# programmatically?
- Refresh button – Refreshing data grid view after inserting, deleting, updating
- Do we have transactions in MS-Access?
- Transitioning from Windows Forms to WPF
- Filtering DataGridView without changing datasource
- Redirect console output to textbox in separate program
- How can I close a login form and show the main form without my application closing?
- How can I customize the system menu of a Windows Form?
- Get the value for a listbox item by index
- SQL Insert Query Using C#
- how I can show the sum of in a datagridview column?
- C# DataGridView Checkbox checked event
- Accessing a form’s control from a separate thread
- SynchronizationContext.Current is null in Continuation on the main UI thread
- Adding Text to DataGridView Row Header
- Changing the color of the title bar in WinForm
- Force to close MessageBox programmatically
- Resize Controls with Form Resize
- Change language at runtime in C# winform
- Process.Start(url) fails
- How to use String property as primary key in Entity Framework
- Winforms : How to bind the Checkbox item of a CheckedListBox with databinding
- Passing object to different windows forms
- Winforms : Intercepting Mouse Event on Main Form first, not on Controls
- Why does text drawn on a panel disappear?