How to create mdb File?
-
How Can i create mdb file, create some table in it(columns..), and add some rows?(in C#) after it, i want to show the file in DataGridView.. But i dont know how to do it..How to open mdb file and show it in the grid? Someone can help me plz? it is for my huge Project? Thank you!
-
How Can i create mdb file, create some table in it(columns..), and add some rows?(in C#) after it, i want to show the file in DataGridView.. But i dont know how to do it..How to open mdb file and show it in the grid? Someone can help me plz? it is for my huge Project? Thank you!
Issue a script that creates a database. Issue a script that creates a table. Issue a script that inserts some data. Read the data from the table and show on a grid.
Giorgi Dalakishvili #region signature my articles #endregion
-
Issue a script that creates a database. Issue a script that creates a table. Issue a script that inserts some data. Read the data from the table and show on a grid.
Giorgi Dalakishvili #region signature my articles #endregion
-
How Can i create mdb file, create some table in it(columns..), and add some rows?(in C#) after it, i want to show the file in DataGridView.. But i dont know how to do it..How to open mdb file and show it in the grid? Someone can help me plz? it is for my huge Project? Thank you!
Unfortunately you can not create Access MDBs using ADO.Net, but you can use COM and ADOX to create the database and tables, and then access the created MDB and tables via ADO.Net and OleDB. The link below, although a VB.Net example, should help you get started. Create Access MDB and Tables in .NET
-
Unfortunately you can not create Access MDBs using ADO.Net, but you can use COM and ADOX to create the database and tables, and then access the created MDB and tables via ADO.Net and OleDB. The link below, although a VB.Net example, should help you get started. Create Access MDB and Tables in .NET
-
thank you but.. It it for Visual Basic...:(.. and i am programming in C#. the catalog object do not exist What i need to do?
Add a reference to the Microsoft ADO Ext (it's a COM object) to your project. In the version I have (2.8) the Catalog is actually called CatalogClass. To test it, I converted the first part of the code to this which works.
ADOX.CatalogClass cat = new CatalogClass();
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=C:\NewMDB.mdb;" +
"Jet OLEDB:Engine Type=5");
Console.WriteLine("Database Created Successfully");
cat = null;Now you should be able to convert the rest and ammend it to suit your needs.
Dave
modified on Sunday, July 13, 2008 2:59 AM
-
Add a reference to the Microsoft ADO Ext (it's a COM object) to your project. In the version I have (2.8) the Catalog is actually called CatalogClass. To test it, I converted the first part of the code to this which works.
ADOX.CatalogClass cat = new CatalogClass();
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" +
@"Data Source=C:\NewMDB.mdb;" +
"Jet OLEDB:Engine Type=5");
Console.WriteLine("Database Created Successfully");
cat = null;Now you should be able to convert the rest and ammend it to suit your needs.
Dave
modified on Sunday, July 13, 2008 2:59 AM
-
Thank you!! i have another question, and sorry for my foolishness, How can i add reference to the Microsoft ADO Ext???