How to Create a SQL Specific Pass Through Query

I have attached a document which outlines how to create a SQL Specific Pass Through Query. This process was originally designed for use with UPS World Ship and the document was started by Alnoor Cassim. I just filled it out adding the part about the Query.

Using a pass through query speeds up reports because it by passes almost all levels of the ODBC driver and issues the call directly to the server. A Crystal report based on a pass through query is noticeably faster than a Crystal report based on the SOTAMAS90 DSN.

Hope this helps everyone

Procedure for using UPS Worldship with MAS 90 or MAS 200 Version 4.doc
  • 0

    Thank you BigLouie. I tried using these for a few of my complex web reports that I created for Sage 100. It did speed up the first one from AP_InvoiceHistoryDetail but it failed on my query that using a running total that works great using linked ODBC tables with the error:

    ODBC --call failed

    [ProvideX][ODBC Driver]Expected lexical element not found: FROM (#1015)

    I googled the error and it looks like with Pass Through Queries the query is run more directly in ProvideX and I cannot use SQL commands that ProvideX does not support.

    And by the way - our UPS / FedEx integrations work great and are not slow despite not using Pass Through Queries.

  • 0 in reply to kdb

    Note that when using pass through queries you should have one query for each table and then have a second query based on that query where you do the running total stuff. That is why you received the error message.

  • 0 in reply to BigLouie

    BigLouie,

    I was doing it the way you mention but had a typo in one of my queries that was actually causing the error. It's working now.

    Old linked ODBC tables: 14 seconds to load report

    New Pass through queries: 7 seconds to load report

    The downside is that it's a lot more work to create and modify reports as I have to add each table / field that I need manually to a pass through query.

    For most reports I use a cached table. For comparison:

    Caches Tabled: 0.3 seconds to load report

    KDB

  • 0

    Thank you.  I have been using your perfect pass-through for years and years - clean documentation is an asset.

  • 0 in reply to JackBuhr

    BigLouie,

    For some reason, I can't get this document to download. Any thoughts?

    Lou

  • 0 in reply to Lwagner

    Send me a check with a lot of zeros? Big Smile Shoot me an email and I'll send you a copy.

  • 0 in reply to BigLouie

    Hey Big Louie-Is it OK if the zero's are leading zeros and to the left of the decimal?

  • 0 in reply to OldMan
    Hi BL,
    Does this document hold true for Sage/MAS 4.50 and Access 2007? I have known you were the guru of all things Access PTQ but I am just now getting around to trying to create one of these. I am running into problems, almost too numerous to name. I am probably just nowhere near as smart as I once thought I was, but after some finagling I can get to the point where I try to pull the data into Crystal using the Access DSN and I'm getting login failures.
    At this point I am going back and searching Sage City for other posts regarding how to set these up and/or troubleshoot these, but just thought you should know.
    Also, I watched a bit of your Town Hall today. Very nice, although the sound was a bit wonky. Good for you for getting the recognition.
    Cheers,
  • 0 in reply to rclowe
    I have used this method since MAS 3.21b with no issues. The problem comes from Access. When creating the query the first time Access ask if you want to save the password in the connection string and when you answer Yes it tells you the string is too long so you have to manually enter it.

    What error messages are you receiving? Feel free to email me.