Parameter Query, Link Oracle Table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Smartin

    #1

    Parameter Query, Link Oracle Table

    I have an Oracle 7x table linked to an Access 97 database. I am trying
    to write a parameter query but can't seem to get it to work.

    When I explicitly specify the parameter in the query it works fine.
    Something like this:
    [color=blue]
    > SELECT *
    > FROM MYTABLE
    > WHERE ACC_NUM = 'XYZ123' ;[/color]


    The following returns no rows:
    [color=blue]
    > PARAMETERS ACCOUNT Text;
    > SELECT *
    > FROM MYTABLE
    > WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);[/color]


    Does anyone have pointers on this? Thanks in advance.
    --
    Smartin
  • Malcolm Cook

    #2
    Re: Parameter Query, Link Oracle Table

    try it w/o the CHR(39)s

    "Smartin" <smartin108@yah oo.com> wrote in message news:3O-dnZdxfbQw4JLZRV n-jg@giganews.com ...[color=blue]
    >I have an Oracle 7x table linked to an Access 97 database. I am trying to write a parameter query but can't seem to get it to work.
    >
    > When I explicitly specify the parameter in the query it works fine. Something like this:
    >[color=green]
    >> SELECT *
    >> FROM MYTABLE
    >> WHERE ACC_NUM = 'XYZ123' ;[/color]
    >
    >
    > The following returns no rows:
    >[color=green]
    >> PARAMETERS ACCOUNT Text;
    >> SELECT *
    >> FROM MYTABLE
    >> WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);[/color]
    >
    >
    > Does anyone have pointers on this? Thanks in advance.
    > --
    > Smartin[/color]


    Comment

    • Smartin

      #3
      Re: Parameter Query, Link Oracle Table

      Malcolm Cook wrote:[color=blue]
      > try it w/o the CHR(39)s
      >[/color]

      Thanks for the suggestion, but it doesn't work with CHR(39), CHR(34), or
      no delimiters.


      --
      Smartin

      Comment

      • Smartin

        #4
        Re: Parameter Query, Link Oracle Table

        Smartin wrote:[color=blue]
        > I have an Oracle 7x table linked to an Access 97 database. I am trying
        > to write a parameter query but can't seem to get it to work.
        >
        > When I explicitly specify the parameter in the query it works fine.
        > Something like this:
        >[color=green]
        >> SELECT *
        >> FROM MYTABLE
        >> WHERE ACC_NUM = 'XYZ123' ;[/color]
        >
        >
        > The following returns no rows:
        >[color=green]
        >> PARAMETERS ACCOUNT Text;
        >> SELECT *
        >> FROM MYTABLE
        >> WHERE ACC_NUM = CHR(39) & [ACCOUNT] & CHR(39);[/color]
        >
        >
        > Does anyone have pointers on this? Thanks in advance.[/color]

        No matter, I've devised a work-around by setting the
        CurrentDb.Query Defs("MyQuery") .SQL property in VBA on the fly with
        parameters from a form. Works great.

        Thanks anyway!

        --
        Smartin

        Comment

        Working...