RE: Can I Pass Query Parameters Through SQL Statements?
From: JohnJohn (JohnJohn_at_discussions.microsoft.com)
Date: 08/10/04
- Next message: Wheat: "NoMatch"
- Previous message: Brendan Reynolds: "Re: Validating data before adding a recordset"
- In reply to: Van T. Dinh: "Can I Pass Query Parameters Through SQL Statements?"
- Next in thread: Ken Snell: "Re: Can I Pass Query Parameters Through SQL Statements?"
- Reply: Ken Snell: "Re: Can I Pass Query Parameters Through SQL Statements?"
- Reply: Van T. Dinh: "RE: Can I Pass Query Parameters Through SQL Statements?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 07:57:04 -0700
Thanks for your reply!
Let me put this in concrete terms. Suppose I have a parameterized query
that looks like this:
SELECT MAX(RecordID) FROM MyTable WHERE CompanyID = [Which company number?];
How would I structure an SQL query to call this query passing the CompanyID
in the SQL string? For what it's worth, the query above will be used as a
subquery nested inside another query.
Thanks!
John
"Van T. Dinh" wrote:
> You can construct the SQL String (with parameters replaced
> by explicit values) in code and then use this String as
> the Source (for Recordset.Open ?)
>
> HTH
> Van T. Dinh
> MVP (Access)
>
>
>
> >-----Original Message-----
> >Hello,
> >
> >I have a parameter query, and really need to be able to
> pass the parameters
> >through an SQL statement rather than an ADO property, or
> anything similar to
> >that. I'm guessing that since my search thus far hasn't
> returned any results
> >indicating that this can be done, that it must not be
> possible.
> >
> >Does anyone know if this is possible?
> >
> >Thanks MUCH!
> >
> >John
> >.
> >
>
- Next message: Wheat: "NoMatch"
- Previous message: Brendan Reynolds: "Re: Validating data before adding a recordset"
- In reply to: Van T. Dinh: "Can I Pass Query Parameters Through SQL Statements?"
- Next in thread: Ken Snell: "Re: Can I Pass Query Parameters Through SQL Statements?"
- Reply: Ken Snell: "Re: Can I Pass Query Parameters Through SQL Statements?"
- Reply: Van T. Dinh: "RE: Can I Pass Query Parameters Through SQL Statements?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|