Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error opening ADODB.Connection #7

Open
ericgj opened this issue Mar 7, 2012 · 0 comments
Open

Error opening ADODB.Connection #7

ericgj opened this issue Mar 7, 2012 · 0 comments

Comments

@ericgj
Copy link

ericgj commented Mar 7, 2012

On jruby 1.6.7, Windows 7 Pro 64 :

require 'win32ole'
connection = WIN32OLE.new('ADODB.Connection')
connection.Open('Provider=Microsoft.Jet.OLEDB.4.0; ...')

I get:

Java::OrgRacobCom::ComFailException: Invoke of: Open
Source: ADODB.Connection
Description: Provider cannot be found. It may not be properly installed.

        from org.racob.com.Dispatch.invokev(Native Method)
        from org.racob.com.Dispatch.invokev(Dispatch.java:243)
        from org.racob.com.Dispatch.callN(Dispatch.java:187)
        from org.jruby.ext.win32ole.RubyWIN32OLE.invokeMethodOrGet(RubyWIN32OLE.
java:205)
        from org.jruby.ext.win32ole.RubyWIN32OLE.method_missing(RubyWIN32OLE.jav
a:113)
        from org.jruby.ext.win32ole.RubyWIN32OLE$i$0$0$method_missing.call(RubyW
IN32OLE$i$0$0$method_missing.gen:65535)
        from org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(Java
Method.java:642)
        from org.jruby.javasupport.util.RuntimeHelpers$MethodMissingMethod.call(
RuntimeHelpers.java:497)
        from org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod
.java:211)
        from org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(Cachin
gCallSite.java:387)
        from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCall
Site.java:309)
        from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.jav
a:169)
        from org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        from org.jruby.ast.RootNode.interpret(RootNode.java:129)
        from org.jruby.evaluator.ASTInterpreter.INTERPRET_EVAL(ASTInterpreter.ja
va:95)
... 121 levels...
        from org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.
java:74)
        from org.jruby.internal.runtime.methods.InterpretedMethod.call(Interpret
edMethod.java:190)
        from org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod
.java:199)
        from org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCall
Site.java:312)
        from org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.jav
a:169)
        from C_3a_.jruby_minus_1_dot_6_dot_7.bin.jirb.__file__(C:\jruby-1.6.7\bi
n\jirb:13)
        from C_3a_.jruby_minus_1_dot_6_dot_7.bin.jirb.load(C:\jruby-1.6.7\bin\ji
rb)
        from org.jruby.Ruby.runScript(Ruby.java:697)
        from org.jruby.Ruby.runScript(Ruby.java:690)
        from org.jruby.Ruby.runNormally(Ruby.java:597)
        from org.jruby.Ruby.runFromMain(Ruby.java:446)
        from org.jruby.Main.doRunFromMain(Main.java:369)
        from org.jruby.Main.internalRun(Main.java:258)
        from org.jruby.Main.run(Main.java:224)
        from org.jruby.Main.run(Main.java:208)
        from org.jruby.Main.main(Main.java:188)irb(main):004:0>
irb(main):005:0*
irb(main):006:0* exir
NameError: undefined local variable or method `exir' for main:Object
        from (irb):6:in `evaluate'
        from org/jruby/RubyKernel.java:1083:in `eval'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:158:in `eval_input'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:271:in `signal_status'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:155:in `eval_input'
        from org/jruby/RubyKernel.java:1410:in `loop'
        from org/jruby/RubyKernel.java:1183:in `catch'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:154:in `eval_input'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:71:in `start'
        from org/jruby/RubyKernel.java:1183:in `catch'
        from C:/jruby-1.6.7/lib/ruby/1.8/irb.rb:70:in `start'
        from C:\jruby-1.6.7\bin\jirb:13:in `(root)'

The same code on MRI ruby does work OK, and the connection is made, so I know it's not a problem with the connection string.

This looks to be similar to issue #3 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant