Question about distributed query

  • I have 2 DBs one on the (Local) and one on a server i want to access the Server DB
    from the connection done on the local to issue distributed query through linked server on the local; the query works but i want to place it in stored procedure and i got the message
    ["Server: Msg 7405, Level 16, State 1, Line 1

    Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query"]

    and i tried to issue the query as:
    "set ansi_nulls on;

    Go

    set ansi_warnings on;

    Go

    Exec MyStoredProcedure

    Go"

    and i tried to place
    "set ansi_nulls on;

    set ansi_warnings on;" Inside the stored procedure but i still have the same Error

    Please HELP ME on This
     
    thx   
  • Very quick google search returns MANY relevent hits...

    Look at http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_20629811.html

    Or, for a tutorial approach.

    http://msdn.microsoft.com/msdnmag/issues/0800/cutting/

    Happy reading

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply