Re: ADODataset: Query parameter used twice in the SQL satatement

From: Jim Albertson (jimalbertson_at_yahoo.co.uk)
Date: 08/09/04

  • Next message: Jim Albertson: "Re: Best Multi-user strategy for ADO on an Access (mdb) file"
    Date: Mon, 9 Aug 2004 10:47:40 +0430
    
    

    "Michael Jacobs" <iq193@earthlink.net> wrote in message news:41169d9d$1@newsgroups.borland.com...
    >
    >
    > Hi Jim,
    >
    >
    > You don't specify how you are setting the value of the parameter, so I am
    > assuming you are using the 'ParamByName' method. What is happening is when
    > the SQL statement is examined to set the parameter a match is found on the
    > 1st occurrence of 'MY_TIME_IN' and that conditions ends the search for a
    > matching parameter. The problem you are encountering is that you have 2
    > parameters in your statement even though you assigned the same name to them
    > they are separate and distinct objects within the SQL statement.
    >
    >
    > I hope this explanation helps.
    >
    >
    > Regards,
    >
    >
    >
    > Michael
    >

    hmmm.... so.. it is a feature..
    thanks Micheal.

    JA


  • Next message: Jim Albertson: "Re: Best Multi-user strategy for ADO on an Access (mdb) file"

    Relevant Pages

    • Re: ADODataset: Query parameter used twice in the SQL satatement
      ... Hi Jim, ... assuming you are using the 'ParamByName' method. ... they are separate and distinct objects within the SQL statement. ... Regards, ...
      (borland.public.delphi.database.ado)
    • Re: Problem if Time used as criteria in Access Queries
      ... "John Spencer" wrote: ... > 1) Specify the AM or PM. ... Please find the SQL statement you asked. ... >> Please note in Case the time criteria contains Minutes. ...
      (microsoft.public.access.queries)
    • Re: Syntax error in FROM clause
      ... You would also need to set command type to adCmdText ... > But I didn't specify an SQL statement. ... > And I choose the Table record source. ...
      (microsoft.public.vb.database.ado)
    • Re: SQL Index Problem
      ... An SQL-index cannot be specified in an SQL statement. ... specify it in the SQL statement. ... The query optimizer does not care about any access paths stored in an ... DDS described logical file. ...
      (comp.sys.ibm.as400.misc)
    • Re: Problem if Time used as criteria in Access Queries
      ... Specify the AM or PM. ... Please find the SQL statement you asked. ... >>> Dear John, ... >>> krish ...
      (microsoft.public.access.queries)