RefreshLink deletes primary keys of ODBC-linked tables

  • Thread starter Thread starter acx
  • Start date Start date
A

acx

Hello,

I would like to ask you this question. I have connected some tables and
views through ODBC from my DB on MS SQL Server to my Access
application. Since views can not have indices I had to manually set
primary keys when establishing the connections firstly. This ensured
that both connected tables and views were updatable.

Now I have to change connection strings to SQL Server via VBA. I am
using RefreshLink method of TableDef objects. The problem is that this
method deletes all primary keys set in Access on SQL Server views. I do
not know how to set them programically again .

Thank you very much for your answers!

Regards,
MikeX
 
Back
Top