User getting ODBC error "Unable to update record"

  • We have a 3rd party application and it's codebase.

    When one of the user ran an option to update user information and

    try to save it, get's the below mentioned error message:

    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.

    I have traced and found out that the following commands are run:

    set ansi_nulls off set ansi_warnings off

    I would like to find out why i'm getting this.

    Thanks

    Murali

  • A stored procedure is one place the change can be made. In the trace could you see which stored procedure or function ran the SQL statement that failed? Some procedures have as the first statements to change the ansi_null settings . Unless it is really necessary in the procedure you need to drop the procedure and recreate after removing the set statements. If any where clause in the procedure only works correctly when ansi nulls are turned off you will need to revise those statements before changing the procedure in your production environment.

  • as memtioned by the user above put those queries in the stored procedure and then try executing it. also check if the client machine have those options set as they take precedence over others.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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