Total parameter query and ODBC-call failed

Discussion in 'Microsoft Access External Data' started by Ivan, Feb 18, 2010.

  1. Ivan

    Ivan Guest

    Hello,

    I use Access 2007 as a front-end to a Microsoft SQL 2008 database via an
    ODBC connection using SQL Server Native Client 10.0 driver.

    If I want to run a total parameter query like this one:

    PARAMETERS [Parameter1] Text ( 255 );
    SELECT TABLE1.FIELD1, [Parameter1] AS FIELD2, Sum(TABLE1.FIELD3) AS FIELD3
    FROM TABLE1
    WHERE <some filters>
    GROUP BY TABLE1.FIELD1, [Parameter1];

    then I get the error message: "ODBC-call failed". TABLE1 is a table from
    SQL server.

    I don't have any problem using simple select query:

    PARAMETERS [Parameter1] Text ( 255 );
    SELECT TABLE1.FIELD1, [Parameter1] AS FIELD2, TABLE1.FIELD3
    FROM TABLE1
    WHERE <some filters>

    I get but the same error "ODBC-call failed" if I save first the second query
    (for example qrySaved) and run then a new total query:

    SELECT qrySaved.FIELD1, qrySaved.FIELD2, Sum(qrySaved.FIELD3) AS FIELD3
    FROM qrySaved
    GROUP BY qrySaved.FIELD1, qrySaved.FIELD2;

    Why? It seems to me that in earlier versions of connections between access
    and SQL I didn't have any such difficulty:

    Thank you for any assistance and help

    Ivan
     
    Ivan, Feb 18, 2010
    #1
    1. Advertisements

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. Kevin3NF

    ODBC--Call Failed

    Kevin3NF, Jul 10, 2003, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    691
    Kevin3NF
    Jul 10, 2003
  2. Carl

    ODBC call failed

    Carl, Jul 12, 2003, in forum: Microsoft Access External Data
    Replies:
    2
    Views:
    5,606
    Joe Fallon
    Jul 13, 2003
  3. Michael

    Acc2000+SQL2000 Run-time error '3146': ODBC-Call Failed

    Michael, Sep 2, 2003, in forum: Microsoft Access External Data
    Replies:
    1
    Views:
    757
    Glen Appleton
    Sep 3, 2003
  4. Arthur Medzhitov

    "ODBC Call Failed" error when linking to SQL Server

    Arthur Medzhitov, Dec 5, 2003, in forum: Microsoft Access External Data
    Replies:
    4
    Views:
    1,936
    Guest
    Jan 19, 2004
  5. Munny

    ODBC Call Failed-Optional feature not implemented

    Munny, Mar 23, 2004, in forum: Microsoft Access External Data
    Replies:
    0
    Views:
    759
    Munny
    Mar 23, 2004
Loading...

Share This Page