[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Relink ODBC tables

Posted on 1998-01-27
3
Medium Priority
?
506 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 800 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

830 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