OpenEdge database and ActiveRecord-jdbc-adapter
- From: Yannick Francois <yaf@kantena.com>
- To: dev@activerecord-jdbc.kenai.com, talk@jruby.kenai.com, user@jruby.codehaus.org
- Subject: OpenEdge database and ActiveRecord-jdbc-adapter
- Date: Wed, 19 Aug 2009 11:30:16 +0200
Hello all,
For many reasons I will explain later, I use JRuby with OpenEdge database.
OpenEdge database have a jdbc driver (type 4) in version 10.1x and
start to have a SQLEngine working fine in last version 10.2a (LIMIT
and OFFSET was implemented in this version...).
I still have a problem on INSERT and UPDATE and I don't know how to solve it.
Here is a simple piece of code:
"
c = CostAccountPlan.new(:id => 234, :code => "fake code")
c.save!
"
This is in UnitTest file.
When I run test, here is the result:
"
ActiveRecord::StatementInvalid: ActiveRecord::ActiveRecordError:
[DataDirect][OpenEdge JDBC Driver]Unsupported method:
Statement.executeUpdate: INSERT INTO pub.cost_account_plans (code,
description) VALUES('fake code', '')
C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_record/connection_adapters/jdbc_adapter.rb:563:in
`execute'
C:/jruby-1.3.1/lib/ruby/gems/1.8/gems/activerecord-jdbc-adapter-0.9.1/lib/active_record/connection_adapters/jdbc_adapter.rb:587:in
`jdbc_insert'
test/unit/cost_account_plan_test.rb:15:in
`test_cap_doit_exister_avec_un_code_et_une_description'
"
I don't understand if error is in OpenEdge JDBC Driver or in
activerecord-jdbc-adapter...
I made some test of this driver with a pur java class, and it's work."
"
Class.forName("com.ddtek.jdbc.openedge.OpenEdgeDriver");
Connection connection = DriverManager.getConnection(
"jdbc:datadirect:openedge://localhost:22402;databaseName=hermes_102A",
"Yaf", "");
Statement stmt = connection.createStatement();
stmt.executeUpdate("INSERT INTO pub.cost_account_plans (id,code)
VALUES(234,'fake code')");
stmt.close();
connection.close();
"
I continue to search, but please, if someone have an idea... I think I
need to make a specific adapter for openedge, but I don't know which
piece of code I need to change and how I can...
ps: Sorry about sending this mail on three mailing list, but I don't
know where to send this...
Thanks
--
Yannick Francois
+33 683 785 716
<http://kantena.com>
|
OpenEdge database and ActiveRecord-jdbc-adapter |
Yannick Francois | 08/19/2009 |





