So from your code I'm assuming it is the CREATE that isn't working, not the 
drop.  I've seen that error message when trying to drop a table and there is a 
"declare cursor" still defined on a temp table that was never dropped.  There's 
only one thing I can think of with the Create, and that's whether some other 
program is creating a temp table with a common column name but with a different 
data type.  But that wouldn't explain why the loop sometimes works.  And I'm 
guessing that no one would have the form or report designer up that uses the 
temp table?
Hey, did you see that Packers / Bears schedule???
Karen
 
 
 
-----Original Message-----
From: Doug Hamilton <bugl...@wi.rr.com>
To: R:Base List <rbase-l@googlegroups.com>
Sent: Fri, May 26, 2023 10:35 pm
Subject: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes

I create a temporary table in a form's On Before Start EEP
The form is run dozens of times a day.
Once or twice a week I trap an SQL 2440 error, "Unavailable resource 
encountered during <command> command".
This is not machine-specific, it occurs on several computers.
SCRATCH is set to TMP - local C:\Users\...\Temp
WAIT TIME is 15 seconds.
INTERVAL is .5 seconds.

What could be causing the error message?  What resource could be 
unavailable?
Or is it a red herring message and it's really something else?

Code is below.
The [error routine] allows up to 4 tries to loop back and create the table.
It usually works the second time; once in a great while it fails after 4 
tries and I exit the program.

TIA & Happy Memorial Day weekend - take a moment to reflect.
Doug

SET ERROR MESSAGE 2038 OFF
DROP TABLE tSHPT
SET ERROR MESSAGE 2038 ON

CREATE TEMPORARY TABLE `tSHPT` +
  (`PIKD_ID` INTEGER, +
  etc )

SET VAR vSQLCode = .SQLCODE
IF vSQLCode <> 0 THEN
   [error routine]
ENDI

-- 
This email has been checked for viruses by Avast antivirus software.
www.avast.com

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/83ca8547-99bc-0b03-214f-f3de6216bc8e%40wi.rr.com.

-- 
For group guidelines, visit 
http://www.rbase.com/support/usersgroup_guidelines.php
--- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rbase-l+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rbase-l/868214035.2618807.1685190929466%40mail.yahoo.com.

Reply via email to