tags:

views:

39

answers:

1

How can I create access 2000-2003 file using C# WPF and add tables in, data in and perform queries on it?

A: 

You can do this like in any other C# .NET application; it does not matter whether or not WPF is used.

Microsoft Knowledge Base Article 317881 explains how to create an empty database in C#.

You can add data and perform queries using OLE DB. The MSDN Library has some samples, e.g. this article.

In order to create tables, you could execute the SQL statement CREATE TABLE. For example,

   string cmd = "CREATE TABLE myTable (id INTEGER, txt CHAR(20))";
   OleDbCommand cmd = new OleDbCommand(sql, oleDbConnection);
   cmd.ExecuteNonQuery();

creates a table with the two columns "id" and "txt".

I hope, this helps.

fmunkert
ok I will try and tell u the result ...
sikas