Solved

Relink ODBC tables

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

816 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

10 Experts available now in Live!

Get 1:1 Help Now