Table insert failure

  • Hi guys

    I have an issue here, I'm unable to see the data inserting into a table in the backend and the logs reports that the insert was successful from the front end logs. Does anyone know when and how a table can have data inserted but not appear in the table because the log is reporting success with the inserts.

    I manually inserted the row into the table and it worked ok which means that the insert script from the log is correct, but when it is run from the application it does not work. By the way the same data inserts into other tables successfully from the front end but just one of the tables. Any help or suggestions much appreciated.

  • Any trigger that could delete that data without throwing an error?

     

    Is it possible that the report accessing that data uses a join on another table which doesn't contain any rows to match on the last insert?

  • I'd run profiler (filtering on the target table and log tables) just to verify that the expected commands are being executed.

    Set profiler to capture any ROLLBACK statements and errors/exceptions

    Does your code attempt to use explicit transactions? Are these constructed properly and is your code logic such that it is impossible to record an apparent successful insertion in the log, when in fact the actual insertion has been rolled back because of an error?

    If the application is failing, does your application connection change the isolation level by default? I've seen this happen before (when using COM+, for example). This can mean that a subtle error can cause a data change to be rolled back when run via the application, even if the error happens some time after that data change. When running the same code through QA, the isolation level remains at your familiar setting, and so everything appears to work.

  • When you say front end log does that mean your own log, if so then I would suggest to run the profiler and try inserting from front end & then stop the profiler & check what is happening.

    You can give a try to the below steps & I feel that it should work,

    Create a similar table manually ie, don't generate the script & run, just create in the design view. Then try inserting to the new table. If it works fine then dump all the data from the existing table to the new one and remove the old table so that you can rename the new table to the existing one.

  • Wow tripple simultenaous post.  Haven't seen that in a long while !

  • I've taken a copy of the database that works and restored as the failed one and now i'm waiting for the application guys to send another message through.

Viewing 6 posts - 1 through 5 (of 5 total)

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