This topic contains 3 replies, has 0 voices, and was last updated by Marty Zigman 12 years, 6 months ago.

  • Author
    Posts
  • #8473

    LarryBlanchette

    This is a one world account. I get this error when using subqueries but I’ve got only 1 role (ADMIN) for my login:

    ERROR: [DataDirect][ODBC OpenAccess SDK driver][OpenAccess SDK

    SQL Engine]NLODBC Driver does not support role mixing. Attempted

    to mix ADMINISTRATOR/ with /[10300]

    Error Code:

    10300

    I saw this thread but suggestions didn’t help:

    https://usergroup.netsuite.com/users…ht=role+mixing

    Here is some SQL to reproduce:

    select account_id, accountnumber, subsidiary_id, sum(amount)

    from

    (

    select account_id, subsidiary_id, amount

    from

    transaction_lines tl

    where

    tl.NON_POSTING_LINE = ‘No’

    ) amts,

    accounts a

    where

    amts.account_id = a.account_id

    group by account_id, accountnumber, subsidiary_id

    I don’t recall seeing this issue before but it is happening today. I can’t be sure if subqueries worked before for this account.

    messing about with this, is see if I wrap the whole thing making it all a subquery it works. This error comes up if I try to join at the top level on a subquery. This works:

    select * from

    (

    select account_id, accountnumber, subsidiary_id, sum(amount)

    from

    (

    select account_id, subsidiary_id, amount

    from

    transaction_lines tl

    where

    tl.NON_POSTING_LINE = ‘No’

    ) amts,

    accounts a

    where

    amts.account_id = a.account_id

    group by account_id, accountnumber, subsidiary_id

    ) ugly
    This is a cached copy. Click here to see the original post.

  • #8474

    tponthieux

    RE: NLODBC Driver does not support Role Mixing …

    I can’t get this to run without openquery, but it seems like you might be able to avoid joining to your subquery like this.

    SELECT

    TL.account_id

    ,A.accountnumber

    ,TL.subsidiary_id

    ,SUM(TL.amount) AS Amount

    FROM Administrator.TRANSACTION_LINES AS TL

    JOIN Administrator.ACCOUNTS AS A

    ON TL.account_id = A.account_id

    WHERE TL.NON_POSTING_LINE = ‘No’

    GROUP BY

    TL.account_id

    ,A.accountnumber

    ,TL.subsidiary_id

  • #8475

    LarryBlanchette

    Thanks for the reply

    The example SQL was just to reproduce the error I was not looking for work arounds.

  • #8476

    Marty Zigman

    RE: NLODBC Driver does not support Role Mixing …

    I spent a fair amount of time trying to get ODBC connected to multiple companies via one account.

    See my article here on it.

    Connecting ODBC to Multiple NetSuite Accounts

    http://blog.prolecto.com/2012/04/30/…uite-accounts/

    Marty Zigman

    Prolecto Resources, Inc.

    http://blog.prolecto.com

You must be logged in to reply to this topic.