[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::sql

Title:SQL notes
Moderator:NOVA::SMITHI
Created:Wed Aug 27 1986
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3895
Total number of notes:17726

3869.0. "CONSTRAINTS and Compound statement" by NLVMS3::MWILLEMS (Das ganze Leben ist ein Quiz) Mon Mar 03 1997 09:59

    Hello,
    
    A customer of mine uses RDB 6.1A on AXP. He has a program that does a
    - set transaction
    - set all constraints on
    - commit
    - begin
        set transaction;
      end.
    When he runs the program he gets with the last set transaction a
    SQLCODE -1005 (Bad transaction handle).
    If the set transaction is not in a compound statement or the set all
    constraints on is commented out, all is ok.
    The customer claims that it also works on RDB 6.1-02 on VAX. I tested
    it on 6.1-04 on Vax and it also fails.
    Is it the combination compound statement/set all constraints on that
    could cause it or is that not permitted?
    Should I bug it?
    
    Marcel Willems, Oracle Rdb support Holland.
    
    Program:
    
identification division.
program-id.   TESTPROG.

environment division.

data division.

working-storage section.

      EXEC SQL declare alias for filename trein_rdb END-EXEC.
      EXEC SQL include SQLCA END-EXEC.

procedure division.

main-routine.
      EXEC SQL set transaction END-EXEC.
      display sqlcode with conversion.
      EXEC SQL set all constraints on END-EXEC.
      display sqlcode with conversion.
      EXEC SQL commit END-EXEC.
      display sqlcode with conversion.
      EXEC SQL 
          begin
    	    set transaction;
    	  end
      END-EXEC.
      display sqlcode with conversion.
      display rdb$lu_status with conversion.
main-routine-exit.
    stop run.
    
T.RTitleUserPersonal
Name
DateLines
3869.1NOVA::SMITHIDon't understate or underestimate Rdb!Mon Mar 03 1997 11:043
Please submit a BUG report so that it can be looked at

Ian