RefreshLink deletes primary keys of ODBC-linked tables

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top