G
Guest
From VB .Net, using either DAO or ADOX (or whatever else is available), how
can I obtain a reference to a database file created in Access? For example,
I tried the following:
Dim AccessApp As New Microsoft.Office.Interop.Access.Application
AccessApp.OpenCurrentDatabase("C:\Documents and Settings\...\filename.mdb")
Dim cat As ADOX.Catalog
cat.ActiveConnection = AccessApp.CurrentProject.Connection
The last statement gives me a "Object reference not set to an instance of an
object" error.
can I obtain a reference to a database file created in Access? For example,
I tried the following:
Dim AccessApp As New Microsoft.Office.Interop.Access.Application
AccessApp.OpenCurrentDatabase("C:\Documents and Settings\...\filename.mdb")
Dim cat As ADOX.Catalog
cat.ActiveConnection = AccessApp.CurrentProject.Connection
The last statement gives me a "Object reference not set to an instance of an
object" error.