Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Execute & Execute Immediate
Sat, Mar 29 2008 3:59 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

I found a bug in one of my scripts yesterday - I'd used EXECUTE IMMEDIATE rather than EXECUTE

 DECLARE ResultCursor SENSITIVE CURSOR WITH RETURN FOR ResultStmt;
 PREPARE ResultStmt FROM 'CREATE INDEX Idx ON "'+TableName+'"('+IdxSet+')';
 EXECUTE  ResultStmt;

But the error message made me think something was wrong with the sql.

Roy Lambert
Mon, Mar 31 2008 4:21 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< I found a bug in one of my scripts yesterday - I'd used EXECUTE IMMEDIATE
rather than EXECUTE

DECLARE ResultCursor SENSITIVE CURSOR WITH RETURN FOR ResultStmt;
PREPARE ResultStmt FROM 'CREATE INDEX Idx ON "'+TableName+'"('+IdxSet+')';
EXECUTE ResultStmt;

But the error message made me think something was wrong with the sql. >>

But did the ElevateDB Manager give you the exact line and column of the
error ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Tue, Apr 1 2008 3:53 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


>But did the ElevateDB Manager give you the exact line and column of the
>error ?

Line number I think was right, column I never counted since it was obvious that what it was talking about just wasn't there to be seen.

Roy Lambert
Tue, Apr 1 2008 5:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Line number I think was right, column I never counted since it was
obvious that what it was talking about just wasn't there to be seen. >>

If this was in the EDB Manager, the cursor should have been positioned right
at the start of the invalid token that was supposed to be a SQL statement.

--
Tim Young
Elevate Software
www.elevatesoft.com

Wed, Apr 2 2008 2:21 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>If this was in the EDB Manager, the cursor should have been positioned right
>at the start of the invalid token that was supposed to be a SQL statement.

Maybe so, but if you think back to some of my other posts EDBManager and I have this disagreement over the line number eg it quotes line 487 for a 5 line procedure type of thing.

Roy Lambert
Wed, Apr 2 2008 2:20 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Maybe so, but if you think back to some of my other posts EDBManager and
I have this disagreement over the line number eg it quotes line 487 for a 5
line procedure type of thing. >>

That was fixed back in 1.08 or so.  It was just an issue with the line and
column numbers for statements that included parameters.  You won't see that
issue again.

--
Tim Young
Elevate Software
www.elevatesoft.com

Image