Results 1 to 5 of 5

Thread: Insert Failing

  1. #1
    Join Date
    Mar 2004
    Posts
    3

    Unanswered: Insert Failing

    I am facing a very strange problem.
    I am doing some logical processing of around 50 records in which i am doing a insert from evaluated variables and few hardcoded values and no where clause. After processing of every record there is a commit. records are read from a mq queue.
    The problem which i am facing is that for the last record it not doing entry in the table. Process is doing everything else in that logical sequence successfully. There is no key on the table and locking scheme is all pages. There is not even any record inserted with junk values.

    There is no deadlock around that time and job has completed successfully.

    this problem is happing once in 10000 transactions.
    Last edited by tarunkalra; 03-18-04 at 11:52.

  2. #2
    Join Date
    Jun 2003
    Posts
    140

    Re: Insert Failing

    are u getting 'insert failed' error ? post the exact error message
    along with the error code

  3. #3
    Join Date
    Mar 2004
    Posts
    3

    Re: Insert Failing

    Originally posted by perl
    are u getting 'insert failed' error ? post the exact error message
    along with the error code
    L_Err = sqlca.sqlcode;
    my error handling is something like this
    if ((L_Err != 0) && (L_Err != 100) && (L_Err != -2601))
    throw exception


    but i am not getting any exception

  4. #4
    Join Date
    Jun 2003
    Posts
    140

    Re: Insert Failing

    try inserting from either isql or sqladv directly and see if the result is same or do u get any error

  5. #5
    Join Date
    Mar 2004
    Posts
    3

    Re: Insert Failing

    Originally posted by perl
    try inserting from either isql or sqladv directly and see if the result is same or do u get any error
    i have tried it all. but the problem is that job is run approx 8000 times a day. I am facing this problem 6 times in 1.5 months. All other logic of that loop has run successfully. Is there any possibility insert statement is skipped (insert is without any where). Or is it possible sqlca.sqlcode in insert is returning 0 ,100, -2601 (No index on table) and inserting no records.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •