Pass Through queries

  • Thread starter Thread starter Tcs
  • Start date Start date
T

Tcs

Today have I have finally started to work with pt queries, and I have something
occurring, which I don't understand.

When I want to edit an append query that uses a pt query as input, or add a pt
query to my append query in design view, I have to WWWAAIIITTT. It's as if
Access is actually processing the pt query, although I never see the data
returned. I mean, everything that SHOULD happen, DOES happen. And I get no
errors. It's just that there is this LONG response time, which I just don't
get.

Is this normal?

FE:
2.6GHz P4
OS=XP Pro
Access 2000 sp3

BE:
AS/400 running DB2, both HW & SW upgraded/updated this past winter

NW:
Not great, but not that bad, either.

Thanks,

Tom
 
Tcs said:
Today have I have finally started to work with pt queries, and I have something
occurring, which I don't understand.

When I want to edit an append query that uses a pt query as input, or add a pt
query to my append query in design view, I have to WWWAAIIITTT. It's as if
Access is actually processing the pt query, although I never see the data
returned. I mean, everything that SHOULD happen, DOES happen. And I get no
errors. It's just that there is this LONG response time, which I just don't
get.

Is this normal?

Yep. To Access the SQL statement in a PassThrough is just a bunch of text.
It has to actually retrieve data from the server when used in the query
design grid so the field list can be displayed, DataTypes recognized, etc..
 
Ahhh...sorry, I don't understand.

I right click on my query and select Design View. I get a window that is all
white except for my code. (Looks similar to Notepad.) The title bar says the
query is SQL-Pass Through. If I right click on the title bar to GO/CHANGE to
the design grid (like I can do when NOT dealing with a pt query), the "Query
Design" selection is grayed out.

In any case...Access still has to play with data, eh? No way to turn this off,
until I'm "ready" for Access to go get data?
 
Tcs said:
Ahhh...sorry, I don't understand.

I right click on my query and select Design View. I get a window that is all
white except for my code. (Looks similar to Notepad.) The title bar says the
query is SQL-Pass Through. If I right click on the title bar to GO/CHANGE to
the design grid (like I can do when NOT dealing with a pt query), the "Query
Design" selection is grayed out.

In any case...Access still has to play with data, eh? No way to turn this off,
until I'm "ready" for Access to go get data?

I was talking about when you add the PT as an input into another query and
that other query is being modified using the query design grid.

Let's say your PT query was "SELECT Field1, Field2 FROM SomeTable". If you
try to include that PT query as the input into a standard query using the
query design grid it will show up in the top of the designer as a rectangle
with the two fields "Field1" and "Field2" displayed in it. Access had to
send the SQL statement in the PT to the server to get the names and
DataTypes of those two fields because there is nothing in the local PT
object that tells Access this information.

To Access, your PT query has a SQL property, but it is just a bunch of
characters. Access cannot parse that statement to figure out the field
names because by definition a PT might use a SQL dialect that Access
doesn't understand. Even if it was smart enough to parse the SQL to get
the names of the fields, it would still have to retrieve from the server
information about those fields (like the DataType of each).

Does that make sense?
 
Oh. OH! Yes, it does now. I should have known realized it, but I just didn't.
Thanks for enlightening me. (Are you sure yesterday wasn't really Friday?)

Really, thanks a lot. I appreciate it.
 
Back
Top