using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using System.Data.OleDb; using System.Data; namespace WpfApplication1 { /// <summary> /// Логика взаимодействия для Form.xaml /// </summary> public partial class Form : Window { public Form() { InitializeComponent(); } private void button1_Click(object sender, RoutedEventArgs e) { OleDbConnection con = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\Дима.accdb;Persist Security Info=True;Jet OLEDB:Database "); con.Open(); OleDbDataAdapter da = new OleDbDataAdapter("select * from Мобільні телефони ", con); OleDbCommandBuilder cb = new OleDbCommandBuilder(da); DataSet ds = new DataSet(); da.Fill(ds, "Мобільні телефони"); DataGrid dg = new DataGrid(); dg.ItemsSource = ds.Tables["Мобільні телефони"].DefaultView; con.Close(); } private void button8_Click(object sender, RoutedEventArgs e) { Environment.Exit(0); } private void button2_Click(object sender, RoutedEventArgs e) { } private void button3_Click(object sender, RoutedEventArgs e) { } private void button4_Click(object sender, RoutedEventArgs e) { } private void button5_Click(object sender, RoutedEventArgs e) { } private void button6_Click(object sender, RoutedEventArgs e) { } private void button7_Click(object sender, RoutedEventArgs e) { } private void dataGrid1_SelectionChanged(object sender, SelectionChangedEventArgs e) { } } } - 3"select * from [Mobile phone]" - Igor
- fourminimal reproducible example and error description. - Qwertiy ♦
|