Add and Delete Access Table

  • 10 years ago

    Hiiiiiiiiiiiiii,

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

    Can anybody help me...

    Thanks..

  • 10 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

  • 10 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.

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.” - Rick Osborne