home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / database / informix / 2443 < prev    next >
Encoding:
Internet Message Format  |  1992-11-16  |  1.9 KB

  1. Path: sparky!uunet!pmafire!mica.inel.gov!ux1!news.byu.edu!gatech!darwin.sura.net!wupost!cs.utexas.edu!sun-barr!olivea!gossip.pyramid.com!pyramid!infmx!davek
  2. From: davek@informix.com (David Kosenko)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: The twin problem (was Re: HELP - Index Locks are creating DEADLOCKS)
  5. Message-ID: <1992Nov16.142151.22200@informix.com>
  6. Date: 16 Nov 92 14:21:51 GMT
  7. References: <OLIVER.92Nov10221419@snoopy.infix.de> <1992Nov11.203538.29976@informix.com> <OLIVER.92Nov13142149@snoopy.infix.de>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 31
  11.  
  12. Oliver Okrongli writes:
  13. >In I-SE 4.0 the error number for "statement not available" was -515.
  14. >This changed to -554 in I-SE 4.1 whithout any obvious reason.  Since
  15. >our code is designed to work with I-SE and I-OnLine whithout
  16. >recompilation one of the first things in database initialization is:
  17. >
  18. >   $set isolation to dirty read;
  19. >   if (!db_stmt_not_available())
  20. >      db_error("set isolation to dirty read");
  21. >
  22. >To work with both releases the definition of db_stmt_not_available had
  23. >to be changed:
  24. >
  25. >   #define db_stmt_not_available()  (db_code() == -515 || db_code() == -554)
  26.  
  27. Please allow me to offer you a (perhaps) better solution.  If you
  28. check a 4.1 or better manual, you will find that following the database
  29. statement, the sqlca structure will contain a flag value indicating
  30. whether an SE or OnLine engine was started (it is one of the sqlwarn
  31. elements - it will also indicate logging/no logging and ansi/no ansi).
  32. If you check this then, you can easily set a global flag that can be
  33. checked for the very purpose of determining appropriate statements.
  34.  
  35. Dave
  36.  
  37.  
  38. -- 
  39. Disclaimer: These opinions are not those of Informix Software, Inc.
  40. **************************************************************************
  41. "I look back with some satisfaction on what an idiot I was when I was 25,
  42.  but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney
  43.