Workarounds for Ruby on Rails + ActiveRecord + Progress OE l

Posted by jpa57 on 16-Jul-2015 21:25

Has anyone successfully worked around the lack of a LIMIT statement in Progress in order to connect Ruby on Rails with ActiveRecord to OE?   Very simple REST urls like http://server/agecode/1 result in symptoms like

ActiveRecord::JDBCError: [DataDirect][OpenEdge JDBC Driver][OpenEdge] Syntax error in SQL statement at or about "LIMIT 1" (10713): SELECT  agecode.* FROM agecode  WHERE agecode.agecod = 1 LIMIT 1

I don't want to maintain my own copy of the framework to generate custom sql .... I was hoping that someone has solved this problem, or given up because it was too hard. Any information is greatly appreciated.

All Replies

Posted by Bill Wood on 16-Jul-2015 21:49

The equivalent on LIMIT 1 is the SELECT TOP 1 in SQL.


I don't know any specifics about changing the SQL dialect for Ruby an Rails for a particular driver but it would be similar to other that use the same Syntax - eg SQL Server.  

Posted by TheMadDBA on 17-Jul-2015 00:54

Have you tried one of the ruby gems that support OpenEdge?

Posted by James Palmer on 17-Jul-2015 03:21

There was a chap a while back who did some work with OE and Ruby - Abe Voelker.

Might be worth contacting him for advice? Although, beware, he's not the biggest fan of OE.

Posted by jpa57 on 17-Jul-2015 15:05

James, that's an awesome lead, thank you.   I'll investigate his work and reach out after I do.  

Posted by jpa57 on 17-Jul-2015 15:10

I punted on ODBC fairly early on and went to JDBC; I tried a bunch of things that were not successful but did not keep good notes about what failed.   The JDBC stuff looks pretty promising with a short list of stuff to deal with, but the LIMIT one seems like the hardest.  

Posted by TheMadDBA on 17-Jul-2015 16:47

If you don't want to try ODBC there are also a few JDBC versions for OpenEdge out there. Abe has one but there are several others on github and other sites.

This thread is closed