Solved

Relink ODBC tables

Posted on 1998-01-27
3
487 Views
Last Modified: 2010-05-18
I'm creating a database that is suposed to work in diferent servers. When i change the server, i have to refresh the links of my tables. Since the computers where i'm going to install that database are using a Runtime version of Access97, i tried relinking the tables using the RefreshLink method of the tabledef or even delete the tabledef and then append it to the tabledefs. But, I have one problem in both solutions, the tables are linked but their updatable propretie is set to FALSE and i don't know how to change this.This way my tables are in Readonly mode.

Hope you can help me!
Thank you
Maria Manuel
0
Comment
Question by:mserra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
Trygve earned 200 total points
ID: 1966762
I take it that you have a client/server solution ?

Here is part of a code that we use to set the indexes for the tables as they are attached. When attaching views you are asked for which fields to use as index.

I have a local table that includes all tables that are to be attached. A Field, UniqueIndex, tells if there are fields that needs to be used as the index for the table. In this field the index fields are listed . example: [CCE],[WorkPackID],[Period]
The code needs to be adapted to your needs. But I suggest that you manually try the index creation lines and the come back to me if you need more information

' Having set rs to point at my table, Name=TableName
If Len(rs!UniqueIndex) > 0 Then
On Error Resume Next
CurrentDb().Execute "DROP INDEX __uniqueindex ON " & rs!Name
On Error GoTo Err_RefreshAttachments
DoCmd.RunSQL "CREATE UNIQUE INDEX __uniqueindex ON " & rs!Name & " (" & rs!UniqueIndex & ")"
End If

Hope this helps !
Trygve
0
 

Author Comment

by:mserra
ID: 1966763
Thnk you trygve !
Thats exactly what i'm going to do .

Do you know any article where this is mentioned ?
I'de tike to read any thing about this?

mserra@inix.pt

0
 
LVL 12

Expert Comment

by:Trygve
ID: 1966764
I have sent you an article that might explain it (its very long).

Also try searching for help on "UNIQUE", "CREATE" and "INDEX" in Access. You will find text and examples of how to create indexes for linked views.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question