Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 7th, 2004, 07:39 AM
Daniels Daniels is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 Daniels User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PSQL extensions problem (EXECUTE STATEMENT)

I have installed Firebird 1.5.1.4481 on Windows and wanted to use EXECUTE STATEMENT in stored procedure, to use a dynamically constructed query.

I wrote just as in examples:
CREATE PROCEDURE TEST
AS
DECLARE VARIABLE SQL VARCHAR(100);
begin
SQL = 'delete from employee';
EXECUTE STATEMENT :SQL;
end

I use IBExpert (have tried also other tools) and during procedure compilation the parser fails at EXECUTE STATEMENT just as if it doesn't recognize it.
The message is:

Invalid token.
Dynamic SQL Error.
SQL error code = -104.
Token unknown - line 6, char 11.
STATEMENT.

Are there any other actions I should take to use PSQL extensions added in Firebird 1.5 release?

Thanks in advance for your help!

Last edited by Daniels : August 7th, 2004 at 07:40 AM. Reason: to correct title

Reply With Quote
  #2  
Old August 8th, 2004, 09:10 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
Make sure you have the latest version of IBExpert of your other tool.


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
Upscene Productions
http://www.upscene.com
__________________
Martijn Tonies
Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
Upscene Productions
http://www.upscene.com

Reply With Quote
  #3  
Old August 10th, 2004, 10:35 AM
klemmo klemmo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 8 klemmo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 21 m 37 sec
Reputation Power: 0
one more remark

if it is latest version of ibexpert, be sure that you enetered the right server version in database registration.

Best Regards

Holger Klemt

Get the 2004 FB Conference DVD with 40 Hours of Session Videos
for just 99 Euro http://www.h-k.de/cd/

The most Expert for InterBase and Firebird --- www.ibexpert.com
HK Software - Huntestrasse 15 - 26135 Oldenburg - Germany
Phone/Fax +49 700 IBEXPERT (42397378) www.h-k.de
Training and Support for Delphi, InterBase, Firebird, AS/400

Reply With Quote
  #4  
Old August 21st, 2004, 09:07 AM
hatuan hatuan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 hatuan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to EXECUTE STATEMENT 'delete from employee where name = 'AAAA'';
Thank you very much

Reply With Quote
  #5  
Old August 21st, 2004, 09:43 AM
upscene upscene is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Posts: 223 upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level)upscene User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 7 h 14 m 50 sec
Reputation Power: 8
Probably like:
How to EXECUTE STATEMENT 'delete from employee where name = ''AAAA'''

(doubling the single quotes to two single quotes)


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
Upscene Productions
http://www.upscene.com

Reply With Quote
  #6  
Old August 22nd, 2004, 08:57 AM
hatuan hatuan is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 3 hatuan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by upscene
Probably like:
How to EXECUTE STATEMENT 'delete from employee where name = ''AAAA'''

(doubling the single quotes to two single quotes)


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
Upscene Productions
http://www.upscene.com


Thank very much

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > PSQL extensions problem (EXECUTE STATEMENT)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway