Reputation: 1
I´m creating a small app on Visual Basic with datadase on access and i have a question, to creat setup with database access is needed a server or exist some other way creat the setup already with the database?
Thanks
Upvotes: 0
Views: 64
Reputation: 974
This code will create an Access database using VBA. You do not need a server for this. This works on Windows 10 using Office 365 from MS Access VBA
Sub CreateDatabaseExample()
Dim oAccess As Object
Set oAccess = CreateObject("Access.Application")
Call oAccess.NewCurrentDatabase("C:\temp\exampleDb.accdb")
Set oAccess = Nothing
End Sub
Upvotes: 1
Reputation: 54417
You don't need Access installed to connect to an MDB or ACCDB file in VB.NET. If it's an MDB file then you can use the Jet OLE DB provider, which is effectively part of Windows. If it's an ACCDB file and you don't have Access installed then you need to install the standalone Access Runtime and then you can use the ACE OLE DB provider.
Upvotes: 1