Tables are, Views are not, not by default. The PK has to be set manually or programmatically against a linked table to a VIEW.Mine are???
Yes, they are, but we should always start with a PK. But it has to be imlemented via VBA or by refreshing the Table,Views are updateable in Access if a unique index is applied, either in e.g. SQL Server or when linked in Access.
Yes, they are, but we should always start with a PK. But it has to be imlemented via VBA or by refreshing the Table,
Ex: CurrentDb.Execute "CREATE UNIQUE INDEX [PK_Name] ON [Tdf_Name] ([Column_Name]) WITH PRIMARY;"
I prefer to have a defined Primary Key before any standard index.Create SQL View Index
This article explains how to create an index on a SQL Server view in Access so that the data can be editedwww.isladogs.co.uk
Perhaps you should have tried the code in my link before making your comment. It does create a PK on one or more fields.I prefer to have a defined Primary Key before any standard index.
I am talking about the pseudo index that is created for Views that do NOT have an index defined so that Access knows what combination of fields defines a unique index. Access doesn't create indexes on the server and the server would never use an index created in Jet or ACE even if one should exist. Therefore, the "index" in this case is information only to be used by the Jet or ACE database engine so that it "knows" what the PK would be for this "table" should there be a physical one. If there is an actual index for the view, presumably, it would be recognized when the view is linked and the user would not be prompted for the index column names.Perhaps you could explain the meaning of 'corporal' in relation to indexes in your first sentence.
Perhaps you should have tried the code in my link before making your comment. It does create a PK on one or more fields.
Then please feel free to ignore the warning. I don't know if it is SQL Server or Access that makes the requirement that only linked tables with PKs or Unique indexes can be updated. If it is Access, then I might be just a little bit worried about what would happen if I defined a unique index incorrectly and Access took it as gospel and then does something stupid because it believed me.I haven't seen any examples of a pseudo index corrupting data in SQL Server and indeed am unclear how that could happen.
That could be old information. I haven't done this in a while.However, refreshing the link using the LTM does not destroy the pseudo index
As I pointed out earlier, the pseudo index created by the prompt when you link to a view that has no unique index defined on SQL Server does neither of these. It creates no physical index on either side of the link. It is merely a definition of what combination of columns will make a row of the view unique. You seem to still think that a view cannot be updated using Access. This is the method that makes it updateable if you do not have the permissions required to add an actual unique index server-side.I create PKs for intended reasons, and I create Indexes for an intended reason.
Not at all.For someone who supposedly doesn't come here looking for arguments, your last reply seems to be trying hard to create one.
None of us here knows all the answers.
I was merely pointing out that the code in my article to create an index on a SQL view is creating a unique PK index, as you would have realised if you had tried it
I never said that. I simply stated that a PK must be created on the linked Table (Access TDF), because in Access they are all called Tables even though we know the Link is to a View, before it can be update from Access,You seem to still think that a view cannot be updated using Access.
It is a pseudo index. It is NOT physical.I never said that. I simply stated that a PK must be created on the linked Table (Access TDF),
Hmmmm. Colin said it isn't lost. Guess I'll have to check.I affirmed your statement that the PK is lost when the Table is refreshed.
Yes, any index on a linked table is a psuedo index. I don't think that is of concern here, but it is good to know that is how it is described.It is a pseudo index. It is NOT physical.
Hmmmm. Colin said it isn't lost. Guess I'll have to check.
That is where I am at now. Just knowing that it can happen and having a solution in place is how I have proceeded with it as well. There are likely many other quirks that we will never know the exact reason for them.Once I figured out the index was being lost, I just used DDL to recreate it after the relink. I never tried to track down the reason. I just moved on. The first time i remember it happening was more than 20 years ago. I'm pretty sure it isn't getting fixed anytime soon.