all groups > sql server odbc > november 2003 >
You're in the

sql server odbc

group:

select unique record identifier


select unique record identifier Michel Elie
11/29/2003 6:02:37 AM
sql server odbc: I am using SQL Server 2000 and Access 2002 for the
interface of my application.

Prolem:

OK, i have some views that I need people to be able to use
in Access 2002 (read/Write). When I try to link them using
my ODBC data source I always get a dialogue box which
says "select unique record identifier".

I don't want the user to do this job (Choosing a unique
record identifier) every time they link to one of my
views.

The only time it work correctly it's when I created a
indexed view in SQL Server, it use the index of the view
and it did't ask me for "Choosing a unique record
identifier". But with this ideal I will have to index all
my view on the Server.

Question:

1- Is it really a bad ideal to index all my view on the
server.

If so!!!

2- Is there any other way in SQL Server, where I can type
some code, to let Access know what are the field it can
use to have a unique record identifier for a view before
that pop-up windows "select unique record identifier" in
Access appear.

I don't want this box to appear, is there anyway I can
stop it?


Thanks a lot in advance!!!!!!
Re: select unique record identifier Sue Hoegemeier
12/1/2003 7:12:35 PM
If you don't want to be prompted, you can create the links
programmatically and then create a "fake" index on the
external data source (SQL Server). Refer to the Create Index
help topic in Access - you would essentially be creating a
unique index on the meta data for the view, not on the
remote data source.
If the underlying data is frequently updated then indexed
views may not necessarily be the best course of action. I
don't know that I would solely use making it easier for
Access clients to link views as a means of determining
whether to use indexed views. I'd look more at figuring out
a programming alternative for the users to link the views.

-Sue

On Sat, 29 Nov 2003 06:02:37 -0800, "Michel Elie"
[quoted text, click to view]
Re: select unique record identifier Michel.Elie NO[at]SPAM ec.gc.ca
12/4/2003 7:52:50 PM
Hi Sue!!!!

[quoted text, click to view]
Create a "fake" index on the external data source (SQL
Server).

Question:
How do you do that or do you have a lead to give me ?

Here's another way to explain my problem:

When a user attach one of my SQL view with the Access
interface, is it possible to let Access know about the key
or index that I want him to use with that view, so that
the screen (select unique record identifier) from Access
won't apear every time the user is linking one of my views
from SQL Server.


[quoted text, click to view]
Re: select unique record identifier Sue Hoegemeier
12/4/2003 9:36:14 PM
It should be in the CREATE INDEX help topic in Access. You
execute a create unique index on the attached table. It
doesn't actually change anything on the remote data source.
You can find more info on it in the following:
ACC: Creating Virtual Indexes with SQL Data-Definition
Queries
http://support.microsoft.com/?id=112131

In order to not get the dialog box asking for the unique
identifier, you would need to link the tables using code and
then create the index.

-Sue

On Thu, 4 Dec 2003 19:52:50 -0800, "Michel.Elie@ec.gc.ca"
[quoted text, click to view]
AddThis Social Bookmark Button