Use function or TempVar in Query

BiigJiim

Registered User.
Local time
Today, 15:45
Joined
Jun 7, 2012
Messages
114
Hi,

I have a query which returns a single Case record, based on a case ID number which can be supplied from a number of different places. Is it better to create a global variable and a function which reads it, and then insert the function into my query WHERE clause, or should I be using a TempVar?

Thanks for any advice,

Jim
 
i use functions to pull a single field using DLookup.
fast and no need for a recordset.
 
Its best if you can do the whole job inside the database engine rather than having to call a custom function.
 
Thanks guys. I'm going with a Tempvar - can't see any obvious downside and the persistent value hold on code break is quite useful when developing!
 

Users who are viewing this thread

Back
Top Bottom