sketchucation logo sketchucation
    • Login
    โš ๏ธ Attention | Having issues with Sketchucation Tools 5? Report Here

    Access database files

    Scheduled Pinned Locked Moved Developers' Forum
    11 Posts 4 Posters 5.7k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • TIGT Offline
      TIG Moderator
      last edited by

      You need to do some homework on how to call a method from WIN32OLE
      http://www.nntp.perl.org/group/perl.beginners/2006/03/msg81806.html
      http://rubyonwindows.blogspot.co.uk/2007/06/using-ruby-ado-to-work-with-ms-access.html
      Isn't it ADODB NOT ADOBD !!!! ๐Ÿ˜’

      TIG

      1 Reply Last reply Reply Quote 0
      • S Offline
        swajime
        last edited by

        Thanks for the quick reply and the homework assignment.
        I switched ADOBD to ADODB like you said (silly me) ... but I still have the same error. I don't get far enough to call any WIN32OLE functions.

        connection = WIN32OLE.new('ADODB.Connection')
        Error; #<WIN32OLERuntimeError; (eval);27;in `initialize'; unknown OLE server; `ADODB.Connection'
            HRESULT error code;0x800401f3
              >
        
        
        1 Reply Last reply Reply Quote 0
        • S Offline
          swajime
          last edited by

          I should also mention that I'm not usning Windows. I'm using Sketchup 2013 in wine-1.6 on Ubuntu 12.04.3. I installed WIN32API.so and WIN32OLE.so as directed in this thread -> http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=42732%26amp;p=500870.

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            So if connection = WIN32OLE.new('ADODB.Connection') fails you can't do it in Linux ? ๐Ÿ˜•
            At least not without changing something...

            TIG

            1 Reply Last reply Reply Quote 0
            • S Offline
              swajime
              last edited by

              Hmmm ... I'm hoping that that isn't the case.
              WIN32OLE has methods ... I would think that if the methods exist that they would work?

              WIN32OLE.methods
              ["const_load", "const_missing", "new", "methods", "allocate", "protected_instance_methods", "include?", "taint", "class_eval", "instance_variable_defined?", "name", "ole_free", "class_variables", "__id__", "singleton_methods", "private_instance_methods", "respond_to?", "nil?", "ancestors", "ole_reference_count", "__send__", "protected_methods", "tainted?", "untaint", "instance_of?", "equal?", "method", "method_defined?", "ole_show_help", "class_variable_defined?", "private_methods", "hash", "constants", "send", "autoload", "kind_of?", "freeze", "eql?", "public_method_defined?", "object_id", "codepage", "id", "codepage=", "public_methods", "connect", "instance_eval", "const_get", "is_a?", "private_method_defined?", "type", "superclass", "instance_variables", "autoload?", "frozen?", "const_set", "to_a", "protected_method_defined?", "instance_method", "class", "public_class_method", "<=>", "instance_variable_get", "==", "===", "to_s", "extend", "instance_methods", ">=", "<=", "clone", "private_class_method", "const_defined?", "included_modules", "instance_variable_set", "=~", "<", ">", "inspect", "public_instance_methods", "display", "dup", "module_eval"]
              
              
              1 Reply Last reply Reply Quote 0
              • BoxB Offline
                Box
                last edited by

                Can you get to work with an excel file, because you can always link an access to an excel.

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  @tig said:

                  So if connection = WIN32OLE.new('ADODB.Connection') fails you can't do it in Linux ? ๐Ÿ˜•

                  REAL Windows comes along with ODBC drivers that support ADO, ADOX, etc.
                  In %windir%\system32 we have the odbcad32.exe utility that "Maintains ODBC data sources and drivers." (quoted from the comment in it's file properties)

                  So check into Wine and see if you need to install some ODBC 3rd party support.

                  Google Search: "odbc under wine" These hits look promising:

                  NativeOdbc - The Official Wine Wiki

                  Below is a tutorial for getting native Windows ODBC drivers working under Wine. Access 2000 can work with Wine, but this how-to doesn't ...
                  Using Windows ODBC drivers - Wine

                  • In fact, some like MSSQL > can > only be accessed on Linux through a Winelib app. Rather than > just copying DLL files, most ODBC drivers ...
                    ... and many more hits ...

                  like: [SOLVED] Howto connect MS ACCESS to MySQL with ODBC in wine ...

                  MSDN REFERENCES:

                  ADO

                  ADO Programmer's Guide

                  ADO Programmer's Reference

                  Microsoft OLE DB Provider for ODBC

                  MS Access uses Jet
                  Microsoft OLE DB Provider for Microsoft Jet

                  ๐Ÿ’ญ

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    Just for ref... on Win7 the "goods" are located in this directory and subdirs:

                    System_DB.png

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      swajime
                      last edited by

                      @box said:

                      Can you get to work with an excel file, because you can always link an access to an excel.

                      On a Windows Vista machine that I have access to, ADODB.Connection appears to be working, but attempting to work with Excel.Application is not working:

                      C;\Users\john>type xls.rb                                              
                      require 'win32ole'
                      excel = WIN32OLE;;new('Excel.Application')
                      # access = WIN32OLE;;new('ADODB.Connection')
                      puts "Hello, World"
                      
                      C;\Users\john>ruby xls.rb
                      xls.rb;2;in `initialize'; unknown OLE server; `Excel.Application' (WIN32OLERunti
                      meError)
                          HRESULT error code;0x800401f3
                            Invalid class string
                              from xls.rb;2;in `new'
                              from xls.rb;2;in `<main>'
                      
                      
                      

                      Neither work on the linux box.

                      1 Reply Last reply Reply Quote 0
                      • Dan RathbunD Offline
                        Dan Rathbun
                        last edited by

                        I stumbled onto this download at Microsoft (looking for something else.)

                        Microsoftยฎ SQL Serverยฎ ODBC Driver 1.0 for Linux

                        The Details say it's for 64bit RedHat 5/6. (But maybe if your Linux uses the same Core..)

                        ๐Ÿ’ญ

                        I'm not here much anymore.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement