devxlogo

How to Link an Access Database with SQL Server

How to Link an Access Database with SQL Server

Question:
I want to extract/insert data by linking one Access table with a SQL server table through VB code. So far, I am not able to to it (using ADO 2.1). Can I write a query in VB similar to:

dbo_retired_hcpc - Sql Server TableTPARTBHCPCSecondFinder - Access tableselect * from dbo_retired_hcpc h, TPARTBHCPCSecondFinder twhere T.hcpc=h.hcpc and t.carrier=h.carrier and t.maint_dt = h.maint_dt) 

Answer:
Within SQL Server, you can certainly reference external tables. Take a look in SQL Enterprise Manager (whichever version you have) for instructions on how to link to an external database. Once you’ve got the database linked, you’ll be able to do queries like you suggested in the question.

devx-admin

Share the Post: