Add and Delete Access Table

  • 13 years ago

    Hiiiiiiiiiiiiii,

    How can i add or delete table in Access 2003 from Vb.Net 2003 ???

    Can anybody help me...

    Thanks..

  • 13 years ago

    I would try using ADO.Net to execute the DDL required to create or drop the table. Very roughly, the code would look something like this:

     

    Dim cnn as OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=myDB.mdb;Persist Security Info=True")
    Dim cmd As New OleDbCommand("CREATE TABLE(..........", cnn)

    cnn.Open()
    cnn.ExecuteNonQuery

  • 13 years ago

    Thanks.... it's can run....

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Better train people and risk they leave – than do nothing and risk they stay.” - Anonymous