home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / database / informix / 1591 < prev    next >
Encoding:
Internet Message Format  |  1992-07-22  |  2.4 KB

  1. Xref: sparky comp.databases.informix:1591 comp.databases:5758
  2. Path: sparky!uunet!rhlab!bkuhn
  3. From: bkuhn@rhlab.UUCP (bmk Bradley Kuhn)
  4. Newsgroups: comp.databases.informix,comp.databases
  5. Subject: Problems with temporary tables in INFORMIX
  6. Keywords: informix, 4gl, temp tables
  7. Message-ID: <477@rhlab.UUCP>
  8. Date: 22 Jul 92 16:33:33 GMT
  9. Followup-To: poster
  10. Organization: Baltimore Rh Laboratory, Inc., Maryland
  11. Lines: 59
  12.  
  13.  
  14. We are running DOS INFORMIX-4GL  V 1.10.06E on a 286 Librex notebook
  15. running MS-DOS 5.0.  We use the protected mode engine, and protected mode
  16. applications.
  17.  
  18.   Much of our code uses temp tables ; Often we execute statements such as
  19. the following :
  20.  
  21. create temp table foo (s serial, x int, str char(20))
  22. .
  23. .
  24. declare c_mumble cursor for
  25.    select int_val, str_val from another_tab
  26.  
  27. foreach c_mumble into prg_var_int, prg_var_str
  28.     insert into foo values (0, prg_var_int, prg_var_str)
  29. end foreach
  30. .
  31. .
  32. .
  33. .
  34. drop table foo
  35.  
  36.  
  37. This code works fine, if we only execute the sequence once per program
  38. run.  However, when we attempt to create the temp table again, using the same
  39. sequence of code we get this error on the first insert attempt:
  40.  
  41. Program stopped at [line of insert command]
  42. SQL statement error number -242.
  43. ISAM error number -9.
  44. Could not open database table (foo)
  45.  
  46. We cannot understand why it cannot open the table, since the program just
  47. created it a few lines before.  Obviously, it has something to do with 
  48. dropping then creating it again, but we can figure out why.  The code works
  49. perfectly on INFORMIX-4GL V 4.00 running on our AT&T 3B2/600 under
  50. AT&T UNIX SYS V R3.2.3.
  51.  
  52. We attempted to remedy the problem by using a permenant table instead of 
  53. a temp table.  This executes better (i.e. we can drop and re-create more than
  54. once), but after about 4 drops and recreates it complete corrupts the database,
  55. so that it must be deleted and re-created. 
  56.  
  57.  Has anyone had any problems of this nature with the PC version?
  58.  
  59. Any help will be appreciated.
  60. Post to comp.databases.informix or by EMAIL.
  61.  -- 
  62.    __                 _             _ _ _      _   ,
  63.   /  )             / //            ' ) ) )    ' ) /       /
  64.  /--<  __  __.  __/ // _  __  ,     / / /      /-<   . . /_  ____
  65. /___/_/ (_(_/|_(_/_</_</_/ (_/_    / ' ( o    /   ) (_/_/ /_/ / <_
  66.                             /
  67.                            '
  68.  -- Bradley M.  Kuhn  Computer Systems Development, Inc
  69.      INTERNET: rhlab!bkuhn@uunet.uu.net OR bkuhn@loyola.edu
  70.      UUCP:     ...uunet!rhlab!bkuhn
  71.  
  72.