Pass Through Query

  • Thread starter Thread starter Kirk Phillips
  • Start date Start date
K

Kirk Phillips

Is is possible to use a pass through query to link to a
SQL VIEW?

I'm getting an ODBC call failed because "view name" is a
view object (#2809)
 
Applies to .mdbs.

SQL views typically are linked in as normal tables (and
are updatable if the underlying view is updatable and you
supply a pseudo-index for the view).

Use pass-through queries to execute stored procedures and
generally issue T-SQL statements to the server.

David
 
Kirk,

'Pass through Query' is only for stored procedures and not for Query.
So use ODBC link for linking a view as you do for a table.
Create a data source for the SQL db and go to table -> new in the Access
database.

Select ODBC (the last option in the type) and you will see a dialog box.
Select the DSN name and select the view.


Thanks
SAM
 
Yes but you have to use the T-SQL SELECT with your View as
the Source. The Pass-Through SQL should be something like:

SELECT *
FROM dbo.vwPFLOEE_PEPipes

(tested in AXP MDB + MS-SQLServer)

The disadvantage is that PTQ is not updatable. Thus, like
other replies, it may be better to link the View to your
Access mdb as a Linked Table.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top