Solved

Relink ODBC tables

Posted on 1998-01-27
3
475 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
  • 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now