Is DAO the way to go?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to add linked tables to an existing access database so I'm writing a
vb.net program to do it.

The only way I found to do it is thru DAO. I dont want to rely on legacy
objects but it seems it's the only way around.

Is there another way to do it to also avoid dependencies on COM components
and keep XCopy deployment?

Thanks
 
My personal preference is to use DAO, but it is possible to use ADOX to
create linked tables.

Create a table object and set its name. Set the table's ParentCatalog to
point to the front-end database. Set the following properties for the table
object:

objTable.Properties("Jet OLEDB:Link Datasource") = <full path to the
back-end database>
objTable.Properties("Jet OLEDB:Remote Table Name') = <name of table in
back-end database>
objTable.Properties("Jet OLEDB:Create Link) = True
objTable.Properties("Jet OLEDB: Link Provider String") = "MS
Access;PWD=admin;"

Once you've do all that, append the table to the Tables collection.

Not sure that's going to make a difference in terms of XCopy deployment,
though. The Jet drivers have to be present whether you use DAO or ADOX.
However, they should be there for most new operating systems.
 
Hi,
I need to add linked tables to an existing access database so I'm
writing a vb.net program to do it.

The only way I found to do it is thru DAO. I dont want to rely on
legacy objects but it seems it's the only way around.

Is there another way to do it to also avoid dependencies on COM
components and keep XCopy deployment?

Thanks

I don't think you can avoid COM, but you can use ADOX.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q275249
 
Back
Top