>> ODBC link to SQL view read only

  • Thread starter Thread starter Jonathan
  • Start date Start date
J

Jonathan

Hi, using Access 2003 I want to programmatically link to a sql view. Access
can recognise the unique id field in a view when I manually link to sql
through a popup dialog.

How do I tell Access the unique id field programmatically?

Any ideas or suggestions appreciated :-)

Many thanks,
Jonathan
 
Jonathan said:
Hi, using Access 2003 I want to programmatically link to a sql view.
Access can recognise the unique id field in a view when I manually
link to sql through a popup dialog.

How do I tell Access the unique id field programmatically?

Any ideas or suggestions appreciated :-)

That popup is not *Access* recognizing the unique field it is *you* telling
Access which field(s) to use precisely because it does not know. When you
do so it builds a local unique index that it can use for updates. If you
link to a view (or a table with no unique index) with code then you have to
include code that builds the unique index on the desired field(s).

Check help file for the CREATE INDEX Statement.
 
Hi Rick, thank's for your response. I have just found that when creating the
view if I include with schemadata in the script Access does seem to recognise
the unique key. That is the view is read/write.

Many thanks,
Jonathan
 
Oooops I mean

WITH SCHEMABINDING

Jonathan

Jonathan said:
Hi Rick, thank's for your response. I have just found that when creating the
view if I include with schemadata in the script Access does seem to recognise
the unique key. That is the view is read/write.

Many thanks,
Jonathan
 
Back
Top