nIGHTmAYOR
Registered User.
- Local time
- Today, 01:53
- Joined
- Sep 2, 2008
- Messages
- 240
ok this isnt actually a question but a trick i'd like to share , if by any chance you have a better way feel free to share 
now here goes the problem first :
you have an updatable view on sql server that is linked to your project , the view shows as a linked table with only one draw back .. no primary key is set. this could be annoying as for further trials to use such view in joined queries it would output an un-updatable query. what is more interesting is that on linking to other non microsoft databases views ex: adaptive sql server anywhere ms access manages to pop up a wizard dialogue that guides you on the process of setting certain fields as primary keys !
now the solution to that :
rename your view temporarily (ex : myview_bak) now create a table with the same structure of view in sql server and set your key as fit. link the table in ms access and notice how access stores table structure including key
. now simply delete the sql server table , rename view back to its default name . notice anything ? yes , access didnt update the table structure and your view now have a set key for it !
Important Notice :
Never refresh table useing linked table manager as it will restore origional structure.
Now my questions :
1 - why would microsoft have it easier for other non microsoft databases ?
2 - is there a way to trigger the key selector dialogue for linked tables programaticaly ?

now here goes the problem first :
you have an updatable view on sql server that is linked to your project , the view shows as a linked table with only one draw back .. no primary key is set. this could be annoying as for further trials to use such view in joined queries it would output an un-updatable query. what is more interesting is that on linking to other non microsoft databases views ex: adaptive sql server anywhere ms access manages to pop up a wizard dialogue that guides you on the process of setting certain fields as primary keys !
now the solution to that :
rename your view temporarily (ex : myview_bak) now create a table with the same structure of view in sql server and set your key as fit. link the table in ms access and notice how access stores table structure including key

Important Notice :
Never refresh table useing linked table manager as it will restore origional structure.
Now my questions :
1 - why would microsoft have it easier for other non microsoft databases ?
2 - is there a way to trigger the key selector dialogue for linked tables programaticaly ?
Last edited: