Using ADOX to create a JET Database

G

gaffar

Hello Sir,
i need the funtionality of Using ADOX to create a JET Database and tables in
it and one to many relationship between the tables.

Thanks for your help
Gaffar.
 
H

Herfried K. Wagner [MVP]

G

Guest

In Solution Explorer, right-click the References node, and then click Add
Reference.
In the Add Reference dialog box, click the COM tab, click Microsoft ADO Ext.
2.7 for DDL and Security, click Select to add it to the Selected Components
section, and then click OK.
Imports ADOX
Module Module1
Sub Main()
Dim cat As Catalog = New Catalog()
cat.Create("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=D:\AccessDB\NewMDB.mdb;" & _
"Jet OLEDB:Engine Type=5")
Console.WriteLine("Database Created Successfully")
cat = Nothing
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top