How to pass a parameter in a stored Access query

Discussion in 'ASP General' started by Jack, Dec 28, 2004.

  1. Jack

    Jack Guest

    Hi,
    I have a stored access query which is corresponding to a particular id.
    However, I am using a login script to capture the value of an id. Now, I want
    to dynamically open the stored query by passing the id captured via login.
    Which means, I need to erase the static id value associated with the stored
    query GMISExpenseCombo.
    My question is how do i open this stored query by passing the id value to
    the stored
    query. I am using this stored query to retrieve some financial data for the
    corresponding record. Any help is appreciated.
    Currently, I am opeing the static stored query as follows
    RS.Open "GMISExpenseCombo"
     
    Jack, Dec 28, 2004
    #1
    1. Advertising

  2. Jack wrote:
    > Hi,
    > I have a stored access query which is corresponding to a particular
    > id. However, I am using a login script to capture the value of an id.
    > Now, I want to dynamically open the stored query by passing the id
    > captured via login. Which means, I need to erase the static id value
    > associated with the stored query GMISExpenseCombo.
    > My question is how do i open this stored query by passing the id
    > value to the stored
    > query. I am using this stored query to retrieve some financial data
    > for the corresponding record. Any help is appreciated.
    > Currently, I am opeing the static stored query as follows
    > RS.Open "GMISExpenseCombo"


    Assuming the name of your connection variable is Conn, do this:

    idvariable = ...
    Set RS=createobject("adodb.recordset")
    Conn.GMISExpenseCombo idvariable, RS

    See here for more information (I've already provided this link to you -
    didn't you read it?)

    http://www.google.com/groups?selm=&oe=UTF-8&output=gplain

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Dec 28, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    4,378
  2. jcpc
    Replies:
    2
    Views:
    1,482
  3. Machelle Chandler

    Using query string to pass a value to a stored procedure parameter

    Machelle Chandler, Oct 21, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    169
    Machelle Chandler
    Oct 21, 2003
  4. Jack
    Replies:
    1
    Views:
    165
    Bob Barrows [MVP]
    Dec 16, 2004
  5. AzamSharp
    Replies:
    2
    Views:
    180
Loading...

Share This Page