• gotcha, so it works correctly most of the time, but not correctly when accessing via PHP.

    When using the PHP application and DBBUser the trigger fails to even run and the application aborts and a trigger error is logged to the SQL Server logs:

    Logon failed for login 'DBBUser' due to trigger execution

    PHP my be setting different ANSI Settings/ variables than you would normally have, from say, and SSMS connection.

    definitely look at the SQL logs; if you find the failed login for PHP, you will find the real, exact error that occurred inside the trigger, and can diagnose from there a lot better.

    my first guess is the SET options like you see here:

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!