how to initialize sqlca struct before execution each sql statement
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: how to initialize sqlca struct before execution each sql statement

  1. #1
    Join Date
    Aug 2005
    Posts
    3

    Pro-C problem on Solaris

    Hi,

    In pro-c when one sql statement fails, then all subsequent sql statments fail. sqlca contains error message from the previous sql execution status.
    Suppose if "select emp_name from emp where emp_id = 100" no_data_found exception then all the sql operations fail (even the simple select statements like "select sequence.nextval from dual" would also fail. Can someone please help me.....

    Regards
    nagraz

  2. #2
    Join Date
    Aug 2005
    Posts
    3
    sqlca is not getting populated when there is no sql statement is executed between beginning and end of transaction. What should I do to initialize the sqlca state in the pro-c code.

    Thanks in advance

  3. #3
    Join Date
    Aug 2005
    Posts
    3

    how to initialize sqlca struct before execution each sql statement

    Hi All,

    I hate to do this (posting again to be on top of the list). I thought I would re-phrase my question.
    After investigations, I found out that sqlca.sqlcode remains unchanged .

    Please have a look following steps.
    Steps :-
    ======
    1) Execute Sql - select emp_name from emp where emp_id = 100.
    Status :
    sqlca.sqlcode is set to 142343
    sqlca.sqlerrmc is set to :no_data_found.

    2) Execute sql - select sequence.nextval from dual
    Status :
    sqlca.sqlcode is set to 142343
    sqlca.sqlerrmc is set to :no_data_found.

    Result : correct value is selected but the sqlca.sqlcode is not changed.
    sqlca.sqlcode is set to 142343
    sqlca.sqlerrmc is set to :no_data_found.

    How can I initialize sqlca struct before execution of sqlca struct.

    I am depending on the

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,026
    It would be better to provide more information in the same thread than to create a new thread!
    this space intentionally left blank

Posting Permissions

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


Click Here to Expand Forum to Full Width