Help needed: Setting parameters in parameter queries 
Author Message
 Help needed: Setting parameters in parameter queries

I am trying to write a generic routine that sets parameters for parameter
queries (VB PE 3.0), because I want to do some centralized error handling
when a parameter is used in ocde but not defined in the query and vice-versa.

However, I cannot find a way passing the query parameter name as a string.

For instance:

I have a querydef called qd and it has a parameter called par.
To set the value of this parameter I must write something like

        qd!par = "..."

But now I have a string variable, lets say sParameterName, which
contains "par", and I want to use it to set the querydef parameter.
So something like:

        qd(sParameterName) = "..."

It seems that there is no way to do this. Does anybody has a clue,
knows a solution or can give me a definite "no it can't" on this?

Thanks,
Erik Siegel

PS: Please CC an answer to me if you can.

-------------------------------------------------------------------------------
Erik Siegel                     | Telephone: +31 50 855336
PTT Telecom BV                  | Telefax  : +31 50 855310

P.O. Box 188                    | DISCLAIMER: This statement is not an official
NL-9700 AD Groningen            | statement from, nor does it represent an
The Netherlands                 | official position of, PTT Telecom B.V.
-------------------------------------------------------------------------------



Fri, 06 Feb 1998 03:00:00 GMT  
 Help needed: Setting parameters in parameter queries

says...

Quote:

>I am trying to write a generic routine that sets parameters for
parameter
>queries (VB PE 3.0), because I want to do some centralized error
handling
>when a parameter is used in ocde but not defined in the query and
vice-versa.

>However, I cannot find a way passing the query parameter name as a
string.

[snip]

   I don't know if it is possible to change the field name in a query
def, however, you could build your entire query in a string in your
subroutine.  Then with a little code you could replace field names with
values passed into the subroutine.



Sat, 14 Feb 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help needed: Setting parameters in parameter queries

2. calling parameter query from a parameter query

3. Greenhorn needs Help On Recordset Parameter Query

4. Need help passing query parameters in a url

5. Need help with this WHERE clause in parameter query

6. Help with SQL parameter query needed!

7. Need Help passing Parameters to SQL query in a VB dataenviroment

8. Filling a Parameter through Code (Parameter Query)

9. Using Parameters from VBA Code in a Parameter Query Export

10. parameter query in VBA when parameter not a field

11. Using Parameter Queries with Optional Parameters

12. Parameter query w/ parameter specifying field name?

 

 
Powered by phpBB® Forum Software