Re: [EXTERNAL] Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
Thanks Dan, good eyes. PIKD_ID _is_ auto-number in the permanent table. I'll start looking through the code to change it. Doug On 6/2/2023 9:51 AM, Dan Goldberg wrote: I find that sometimes rbase does not like you to use the same column name as an autonumbered or computed column in another table. I usually use another column name like putting a “t” prefix. Dan Goldberg *From:* rbase-l@googlegroups.com *On Behalf Of *Doug Hamilton *Sent:* Friday, June 2, 2023 7:30 AM *To:* rbase-l@googlegroups.com *Subject:* [EXTERNAL] Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes I sent this on 5/30 but it didn't go through. My apologies if it's a duplicate. Clarifications on create temp table based on responses received: Main Menu is RFF, db is disconnected. Main Menu item is clicked, db gets connected, the form starts and runs OBS EEP to create temp table. At this point, no temp tables exist because the db has been disconnected for this user; so there can't any open cursors on the temp table that's going to be created. Create temp table code is from permanent table definition with "TEMPORARY" added; the first column, PIKD_ID, exists in another table - it has same column name and datatype. If another user had created a temp table, wouldn't that table and its columns be invisible to this user? And a table, temp or permanent, can't be created with common column name and different datatype. No user would have form designer open, I can do enough damage on my own :) Hmm, good point though - I do form development on my system and unload the form, then load it into client's system. Client's designers are rarely used. Thanks for the responses and making me think this through a little more. Doug Karen: Packers/Bears - Yeah, what a way to start/end the season. Packers are gonna be in "rebuild" mode for a few seasons. On 5/27/2023 7:35 AM, 'Karen Tellef' via RBASE-L wrote: 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 <mailto:bugl...@wi.rr.com> To: R:Base List <mailto: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". 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 <http://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 gro
RE: [EXTERNAL] Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
I find that sometimes rbase does not like you to use the same column name as an autonumbered or computed column in another table. I usually use another column name like putting a "t" prefix. Dan Goldberg From: rbase-l@googlegroups.com On Behalf Of Doug Hamilton Sent: Friday, June 2, 2023 7:30 AM To: rbase-l@googlegroups.com Subject: [EXTERNAL] Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes I sent this on 5/30 but it didn't go through. My apologies if it's a duplicate. Clarifications on create temp table based on responses received: Main Menu is RFF, db is disconnected. Main Menu item is clicked, db gets connected, the form starts and runs OBS EEP to create temp table. At this point, no temp tables exist because the db has been disconnected for this user; so there can't any open cursors on the temp table that's going to be created. Create temp table code is from permanent table definition with "TEMPORARY" added; the first column, PIKD_ID, exists in another table - it has same column name and datatype. If another user had created a temp table, wouldn't that table and its columns be invisible to this user? And a table, temp or permanent, can't be created with common column name and different datatype. No user would have form designer open, I can do enough damage on my own :) Hmm, good point though - I do form development on my system and unload the form, then load it into client's system. Client's designers are rarely used. Thanks for the responses and making me think this through a little more. Doug Karen: Packers/Bears - Yeah, what a way to start/end the season. Packers are gonna be in "rebuild" mode for a few seasons. On 5/27/2023 7:35 AM, 'Karen Tellef' via RBASE-L wrote: 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 <mailto:bugl...@wi.rr.com> To: R:Base List <mailto: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". 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<http://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<mailto: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<mailto: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<https://groups.google.com/d/msgid/rbase-l/868214035.2618807.1685190929466%40mail.yahoo.com?utm_medium=email&utm_source=footer>. [https://s-install.avcdn.net
Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
I sent this on 5/30 but it didn't go through. My apologies if it's a duplicate. Clarifications on create temp table based on responses received: Main Menu is RFF, db is disconnected. Main Menu item is clicked, db gets connected, the form starts and runs OBS EEP to create temp table. At this point, no temp tables exist because the db has been disconnected for this user; so there can't any open cursors on the temp table that's going to be created. Create temp table code is from permanent table definition with "TEMPORARY" added; the first column, PIKD_ID, exists in another table - it has same column name and datatype. If another user had created a temp table, wouldn't that table and its columns be invisible to this user? And a table, temp or permanent, can't be created with common column name and different datatype. No user would have form designer open, I can do enough damage on my own :) Hmm, good point though - I do form development on my system and unload the form, then load it into client's system. Client's designers are rarely used. Thanks for the responses and making me think this through a little more. Doug Karen: Packers/Bears - Yeah, what a way to start/end the season. Packers are gonna be in "rebuild" mode for a few seasons. On 5/27/2023 7:35 AM, 'Karen Tellef' via RBASE-L wrote: 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 To: R:Base List 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". 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 <https://groups.google.com/d/msgid/rbase-l/868214035.2618807.1685190929466%40mail.yahoo.com?utm_medium=email&utm_source=footer>. -- 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/6c741e6b-0182-5e93-e788-c32f5d5b7e09%40wi.rr.com.
Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
Clarifications based on responses: Main Menu is RFF, db is disconnected. Main Menu item is clicked, db gets connected, the form starts and runs OBS EEP to create temp table. At this point, no temp tables exist because the db has been disconnected for this user; so there can't any open cursors on the temp table that's going to be created. Create temp table code is from permanent table definition with "TEMPORARY" added; the first column, PIKD_ID, exists in another table - it has same column name and datatype. If another user had created a temp table, wouldn't that table and its columns be invisible to this user? And a table, temp or permanent, can't be created with common column name and different datatype. No user would have form designer open, I can do enough damage on my own :) Hmm, good point though - I do form development on my system and unload the form, then load it into client's system. Client's designers are rarely used. Thanks for the responses and making me think this through a little more. Doug Packers/Bears - Yeah, what a way to start/end the season. Packers are gonna be in "rebuild" mode for a few seasons. On 5/27/2023 7:35 AM, 'Karen Tellef' via RBASE-L wrote: 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 To: R:Base List 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". 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 <https://groups.google.com/d/msgid/rbase-l/868214035.2618807.1685190929466%40mail.yahoo.com?utm_medium=email&utm_source=footer>. -- 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/7e0ac41a-1425-856b-ea53-d7a34c16a45c%40wi.rr.com.
Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
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 To: R:Base List 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". 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.
Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
Hi Doug, What Tony says. The Temp Tables are deleted automatically when the session is closed anyway and row deletion is not problematic anyway. On Saturday, May 27, 2023 at 3:09:35 AM UTC-4 Tony IJntema wrote: > Hi, > > Though it is maybe not the expected answer to your question, it could be a > solution for your problem. > > What you can do is create the temp table once and then only delete all the > rows when you start the procedure. > > Tony > > > Op 27-05-2023 om 05:35 schreef Doug Hamilton: > > 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". > 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 > > -- 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/82e48283-255e-4dba-8864-6ff43e77097en%40googlegroups.com.
Re: [RBASE-L] - CREATE TEMPORARY TABLE fails sometimes
Hi, Though it is maybe not the expected answer to your question, it could be a solution for your problem. What you can do is create the temp table once and then only delete all the rows when you start the procedure. Tony Op 27-05-2023 om 05:35 schreef Doug Hamilton: 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". 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 -- 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/ba5ef9c1-db11-2b76-c819-d7a5c318d6e3%40cio-bv.nl.
[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". 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.