Pass Through Query

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)
 
G

GreySky

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
 
S

Sambantham Kuppusamy

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
 
V

Van T. Dinh

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top