Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGL Development Tools » Cannot use GET with FROM clause within FOREACH
Cannot use GET with FROM clause within FOREACH [message #810818] Thu, 01 March 2012 15:40 Go to next message
Daniel Rippa is currently offline Daniel Rippa
Messages: 10
Registered: March 2012
Junior Member
EGL Development Tools
Version: 0.8.0.v201202280901-1Co-FjuJ6QMNSP3ynscd8h8C
DedicatedService
Eclipse 3.7.1
Generation Language: Java, JavaScript

Error:
IWN.VAL.6510.e 36/28
The FOREACH SQL I/O statement does not allow the FROM option to be specified more than once.

...
ds SQLDataSource? {@Resource{uri="binding:SomeValidBinding"}};
...
 
function ...
 
  rs SQLResultSet?;
  open rs from ds using(someParameter) with #sql{
    select * from someTable where someField = ?
  };
  someRecord1 SOMERECORD;
  forEach (someRecord1 from rs)
    someOtherRecord1 SOMEOTHERRECORD { id=someRecord1.ID };
    get someOtherRecord1 from ds; <-- ERROR occurs here
  end

end


Is this illegal syntax?
Re: Cannot use GET with FROM clause within FOREACH [message #810837 is a reply to message #810818] Thu, 01 March 2012 15:57 Go to previous messageGo to next message
Justin Spadea is currently offline Justin Spadea
Messages: 66
Registered: July 2009
Member
Hi Daniel,

This is a bug in validation. Please submit a bug report at "https: //bugs.eclipse .org/bugs/enter_bug.cgi?product=EDT" (remove the spaces, this forum isn't allowing me to post hyperlinks).

For now you can work around this by putting the code in another function and invoking the function inside the forEach block.

-Justin
Re: Cannot use GET with FROM clause within FOREACH [message #810921 is a reply to message #810837] Thu, 01 March 2012 17:32 Go to previous message
Daniel Rippa is currently offline Daniel Rippa
Messages: 10
Registered: March 2012
Junior Member
Will submit the bug. Thanks for the quick reply, Justin!
Previous Topic:Forward & onprerender function in EDT
Next Topic:Dojo Widget Error in Using Handler
Goto Forum:
  


Current Time: Sun Oct 26 09:33:37 GMT 2014

Powered by FUDForum. Page generated in 0.04483 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software