Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 12 total |
ElevateDB Error #700 |
Tue, Apr 24 2012 9:06 AM | Permanent Link |
Charalampos Michael | Hello,
I'm getting an error with the following script: SCRIPT BEGIN USE "Examinations"; USE "Scheduler"; EXECUTE IMMEDIATE 'REPAIR TABLE "Details"'; EXECUTE IMMEDIATE 'REPAIR TABLE "Details" STATISTICS'; EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Details"'; EXECUTE IMMEDIATE 'REPAIR TABLE "Master"'; EXECUTE IMMEDIATE 'REPAIR TABLE "Master" STATISTICS'; EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Master"'; EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types"'; EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types" STATISTICS'; EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Lookup - Types"'; END ElevateDB Error #700 An error was found in the script at line 4 and column 1 (Missing label name). DatabaseName is "Configuration". IOW, i'm trying to do Repair and OptimizeTable with a single script. Within EDB Manager it works OK. Any Ideas ? Thank you |
Tue, Apr 24 2012 9:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Charalampos
>SCRIPT >BEGIN >USE "Examinations"; >USE "Scheduler"; >EXECUTE IMMEDIATE 'REPAIR TABLE "Details"'; >EXECUTE IMMEDIATE 'REPAIR TABLE "Details" STATISTICS'; >EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Details"'; >EXECUTE IMMEDIATE 'REPAIR TABLE "Master"'; >EXECUTE IMMEDIATE 'REPAIR TABLE "Master" STATISTICS'; >EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Master"'; >EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types"'; >EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types" STATISTICS'; >EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Lookup - Types"'; >END > >ElevateDB Error #700 An error was found in the script at line 4 and >column 1 (Missing label name). > >DatabaseName is "Configuration". For starters I'm really confused by the script. You open Examinations and then close it by opening Scheduler, you're repairing each table twice. If you need STATISTICS then just the one repair using that should suffice. If it works in EDBManager it should work in your code. Eyeballing it I can't spot anything (mind you I can never remember what the line count starts at or which line it starts on). The only thing I wonder about is setting the databasename to configuration. This may be a very silly question but you have you loaded this in a script component and not a query? Roy Lambert [Team Elevate] |
Tue, Apr 24 2012 10:08 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I'm getting an error with the following script: >> I'm not seeing this here - are you sure that you posted the correct script ? Also, Roy is correct - you don't need both REPAIR TABLE statements - just the first one without the STATISTICS clause (deprecated) will suffice. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 25 2012 4:01 AM | Permanent Link |
Charalampos Michael | Dear Roy,
The script is produced after scanning the catalag for all databases and tables. In this case the "Examinations" Database is empty for the monent. I'm executing with TEDBScript, see below: Script := TEDBScript.Create(nil); Script.SessionName := Session.SessionName; Script.DatabaseName := Database.DatabaseName; with vScript, SQL do begin Add the below script; ExecScript; end > Charalampos > >> SCRIPT >> BEGIN >> USE "Examinations"; >> USE "Scheduler"; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Details"'; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Details" STATISTICS'; >> EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Details"'; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Master"'; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Master" STATISTICS'; >> EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Master"'; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types"'; >> EXECUTE IMMEDIATE 'REPAIR TABLE "Lookup - Types" STATISTICS'; >> EXECUTE IMMEDIATE 'OPTIMIZE TABLE "Lookup - Types"'; >> END >> >> ElevateDB Error #700 An error was found in the script at line 4 and >> column 1 (Missing label name). >> >> DatabaseName is "Configuration". > > For starters I'm really confused by the script. You open Examinations and then close it by opening Scheduler, you're repairing each table twice. If you need STATISTICS then just the one repair using that should suffice. > > If it works in EDBManager it should work in your code. Eyeballing it I can't spot anything (mind you I can never remember what the line count starts at or which line it starts on). The only thing I wonder about is setting the databasename to configuration. > > This may be a very silly question but you have you loaded this in a script component and not a query? > > Roy Lambert [Team Elevate] |
Wed, Apr 25 2012 4:02 AM | Permanent Link |
Charalampos Michael | Dear Tim,
> Michael, > > << I'm getting an error with the following script: >> > > I'm not seeing this here - are you sure that you posted the correct > script ? > > Also, Roy is correct - you don't need both REPAIR TABLE statements - > just the first one without the STATISTICS clause (deprecated) will suffice. > Ok Tim and Roy but this isn't the problem i'm facing. |
Wed, Apr 25 2012 5:18 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Charalampos
> The script is produced after scanning the catalag for all databases >and tables. In this case the "Examinations" Database is empty for >the monent. OK that explains that one >I'm executing with TEDBScript, see below: And that takes care of the "bleeding obvious". Last time before I posted I had a look at error 700 and the manual says An error was found in the <ObjectType> at line <Line> and column <Column> (<ErrorMessage>)This error is raised whenever an error is encountered while compiling an SQL expression, statement, or routine. The specific error message is indicated within the parentheses. Unfortunately I don't understand the term (Missing label name) in the parentheses and there's nothing in the manual that seems relevant. Look in the pdf sql manual and you'll see what I mean. If it works in EDBManager then there has to be some difference either in your code, or in the version of ElevateDB or the sql itself. Since you're programmatically generating it there is a possibility that some invisible to you character is in the sql but cut'n'pasting to EDBManager removes it. Try generating the sql, cut'n'paste to Notepad and back to the TEDBScript and run that in your app. If it works then you've at least identified where the cause lies. If not try commenting out each line in turn and running it to see if you can spot something. Sorry I can't be more helpful. Roy Lambert [Team Elevate] |
Wed, Apr 25 2012 5:59 AM | Permanent Link |
Charalampos Michael | Dear Roy,
I've saved and loaded the script into EDB Manager it works but not with TEDBScript. > Charalampos > > >> The script is produced after scanning the catalag for all databases >> and tables. In this case the "Examinations" Database is empty for >> the monent. > > OK that explains that one > >> I'm executing with TEDBScript, see below: > > And that takes care of the "bleeding obvious". > > Last time before I posted I had a look at error 700 and the manual says > > An error was found in the<ObjectType> at line<Line> > and column<Column> (<ErrorMessage>)This error is > raised whenever an error is encountered while > compiling an SQL expression, statement, or routine. > The specific error message is indicated within the > parentheses. > > Unfortunately I don't understand the term (Missing label name) in the parentheses and there's nothing in the manual that seems relevant. Look in the pdf sql manual and you'll see what I mean. > > If it works in EDBManager then there has to be some difference either in your code, or in the version of ElevateDB or the sql itself. Since you're programmatically generating it there is a possibility that some invisible to you character is in the sql but cut'n'pasting to EDBManager removes it. > > Try generating the sql, cut'n'paste to Notepad and back to the TEDBScript and run that in your app. If it works then you've at least identified where the cause lies. If not try commenting out each line in turn and running it to see if you can spot something. > > Sorry I can't be more helpful. > > Roy Lambert [Team Elevate] |
Wed, Apr 25 2012 8:44 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Charalampos
> I've saved and loaded the script into EDB Manager it works but not >with TEDBScript. There has to be something different in the two environments. All Tim does is take what's on the page, stuff it in an EDBScript and execute it. Roy Lambert [Team Elevate] |
Wed, Apr 25 2012 1:57 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Unfortunately I don't understand the term (Missing label name) in the parentheses and there's nothing in the manual that seems relevant. Look in the pdf sql manual and you'll see what I mean. >> SQL/PSM allows the use of labels for looping constructs, code blocks, etc. so that you can say LEAVE <Label> and exit a loop out into a specific label. This error comes up when the parser encounters a condition where it expects a token to be a label for a code block, etc. but has hit the end of the input SQL. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Apr 25 2012 1:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I've saved and loaded the script into EDB Manager it works but not with TEDBScript. >> Did you save it directly from the debugger in the IDE at the point right before the script is executed or prepared in your code ? There has to be a difference for it to work in the EDB Manager, but not in your code. -- Tim Young Elevate Software www.elevatesoft.com |
Page 1 of 2 | Next Page » | |
Jump to Page: 1 2 |
This web page was last updated on Thursday, May 23, 2024 at 07:54 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |