Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Relink ODBC tables

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
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.

610 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