Re: Action pass-through with a form variable Access 2003



You can't "integrate variables into a pass-through query" because those
variables don't exist on the server where it will execute. What you can
do, however, is to use the values of those variables (Controls on a Form,
just By The Way, are not "variables" in Access terms) and construct the SQL
(in the Server's dialect of SQL, not the Access dialect) to pass to the
server. By using a Pass-Through Query are telling Jet and ODBC to leave it
completely alone... to "pass it through" exactly as you have written it.

You can use variables in a regular query that will first be processed by the
Jet or ACCDB database engine before being handed over to the ODBC driver.
Not every query from Access that is executed on a server need be a
"pass-through query", but if you have / can write the SQL,
pass-through-queries may execute a bit faster.

Another note: in some servers, e.g., MS SQL Server, "timestamp" is a special
type of field, not a "date and time" as you know them in Access.

Larry Linson
Microsoft Office Access MVP


"magickarle" <magickarle@xxxxxxxxxxx> wrote in message
news:9bdf57af-8cd2-4dff-9861-3a0125e9ac92@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi, I got a pass-through query (that takes about 15 mins to process)
I would like to integrate variables to it.
IE: something simple:
Select EmplID from empl_Lst
where empl_lst.timestamp between [Forms]![MainForm]![StrMonth] And
[Forms]![MainForm]![Endmonth]

Not sure how to do so (should it be a query in Access or a macro)
The connection would be ODBC.

I'm a bit new to create queries and macros but I learn fast loll.
Thank you.


.



Relevant Pages

  • Re: Action pass-through with a form variable Access 2003
    ... variables don't exist on the server where it will execute. ... You can use variables in a regular query that will first be processed by the ... Jet or ACCDB database engine before being handed over to the ODBC driver. ...
    (comp.databases.ms-access)
  • Re: [PHP] how to curl
    ... i have a few questions as well; is the query being executed on the provider ... consumer (the one you intend to execute the curl request from)? ... Yes I'm doing on the both the server. ... And when a consumer server will send ...
    (php.general)
  • Query governor problem
    ... advanced server and Windows 2003 server. ... The query will normally execute in less than a second. ... the cpu estimate used by the query governor will always be for the ...
    (microsoft.public.sqlserver.server)
  • How can I find out information about process based on spid?
    ... sometimes I cannot connect to the server using enterprise ... execute sp_who2 from query analyzer... ... This stored procedure provides me with the list of spids ...
    (microsoft.public.sqlserver.server)
  • Re: Calling procedure via ODBC
    ... You should be able to call the procedure on the server side. ... Just make a pass-through query in ms-access. ... Execute sp_yourProceure ...
    (microsoft.public.access.modulesdaovba)