![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
![]() |
Fri, Nov 14 2008 12:53 PM | Permanent Link |
Allan Brocklehurst | Hello;
Firstly I want to say that although there is some minor pain in converting my exist DBISAM4 (D007) application to EDB, I aM more than pleased with tHe results so far. Now down to business: the attached script in built in code as in MM_Script.SQL.Add('/* Last Run : ' + DateTimeToStr(Now) + ' */'); MM_Script.SQL.Add(' '); MM_Script.SQL.Add('BEGIN'); MM_Script.SQL.Add('EXECUTE IMMEDIATE ' + '''DROP TABLE "' + SAP_VENDOR_MASTER_NAME + '" '' ;'); MM_Script.SQL.Add('EXCEPTION'); MM_Script.SQL.Add('END ;'); .... The Script bombs both in code and in the EDBmanager/ it bombs on the "DROP TABLE" Statement . the table is not there on the first run Any Suggestions TIA Allan Attachments: ReBuildSAPVendormaster.sql |
Fri, Nov 14 2008 2:48 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Allan,
<< The Script bombs both in code and in the EDBmanager/ it bombs on the "DROP TABLE" Statement . the table is not there on the first run >> Are you sure that you're not simply seeing the fact that the EDB Manager and the IDE both, by default, stop on exceptions ? What happens when you click on the Continue button in the EDB Manager after the exception ? -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Nov 15 2008 3:34 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Allan
Tim's probably right, and whilst in performance terms he tells me there's little or no difference I prefer something like DECLARE InfoCursor SENSITIVE CURSOR FOR InfoStmt; PREPARE InfoStmt FROM 'SELECT * FROM Information.Tables WHERE Name=?'; OPEN InfoCursor USING TableName; IF (ROWCOUNT(InfoCursor) > 0) THEN EXECUTE IMMEDIATE 'DROP TABLE "'+TableName+'"'; END IF; simple because you don't have to worry about exceptions. Roy Lambert [Team Elevate] |
Sat, Nov 15 2008 8:28 AM | Permanent Link |
Allan Brocklehurst | In the EDBmanager I click continue and it does continue but seems to
hang. I cannot replicated that error here, I'm at home, not at the office. but will send a screen shot in on Monday Roy. I'll take your advice and use your technique. Thanks guys Allan Tim Young [Elevate Software] wrote: > Allan, > > << The Script bombs both in code and in the EDBmanager/ it bombs on the > "DROP TABLE" Statement . the table is not there on the first run >> > > Are you sure that you're not simply seeing the fact that the EDB Manager and > the IDE both, by default, stop on exceptions ? What happens when you click > on the Continue button in the EDB Manager after the exception ? > Attachments: brock.vcf |
Sat, Nov 15 2008 4:12 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Allan,
<< In the EDBmanager I click continue and it does continue but seems to hang. I cannot replicated that error here, I'm at home, not at the office. but will send a screen shot in on Monday >> If you're executing a script in the EDB Manager with a remote session, then a hang after the script executes is a known bug and will be fixed in 2.02 Build 4 (looks like this weekend). The remote debugging is fairly tricky due to multiple thread communications occurring over the same connection, and it tripped EDB up in the last build. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, Nov 17 2008 9:23 AM | Permanent Link |
Allan Brocklehurst | Tim; No I'm not using a remote session. It is probably me. I'm new to Script writing and an am trying to get my sea legs. I have a number of scripts to write that will build new tables so I want to make sure I get it right before this version goes into production still plugging Allan "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote: Allan, << In the EDBmanager I click continue and it does continue but seems to hang. I cannot replicated that error here, I'm at home, not at the office. but will send a screen shot in on Monday >> If you're executing a script in the EDB Manager with a remote session, then a hang after the script executes is a known bug and will be fixed in 2.02 Build 4 (looks like this weekend). The remote debugging is fairly tricky due to multiple thread communications occurring over the same connection, and it tripped EDB up in the last build. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |