------art_115092_16364717.1154536461017
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I am trying to get an instance of DAO.DataTypeEnum class using Win32OLE but
it gives the error mentioned before in my earlier email.
Apart from the classes which are listed when ur script is run, there are
other classes under DAO which I want to instantiate and use.

Thanks and Regards,
Jatinder


On 8/2/06, Masaki Suketa <masaki.suketa / nifty.ne.jp> wrote:
>
> Hello,
> In message "Using Win32OLE library for DAO"
>    on 06/08/01, "Jatinder Singh" <jatinder.saundh / gmail.com> writes:
>
> > I am trying to do something like following to connect to a MS Access db
> from
> > ruby
> > db  IN32OLE.*new*("DAO.Database")
> >
> > but it gives me an error  "accessQuery.rb:17:in `initialize': unknown
> OLE
> > server: `DAO.Database' (WIN32OLER
> > untimeError)"
> > How can I use DAO object library from ruby?
>
> I have not used DAO, but I hope that DAO.DBEngine is what you want.
>
> require 'win32ole'
> WIN32OLE_TYPE.progids.each do |p|
>    if /dao/i p
>      puts p
>    end
> end
>
> In my win2k box, the result of above script is:
> DAO.DBEngine.36
> DAO.PrivateDBEngine.36
> DAO.TableDef.36
> DAO.Field.36
> ...
>
> And
> require 'win32ole'
> dao  IN32OLE.new('DAO.DBEngine.36')
> works fine.
>
> Regards,
> Masaki Suketa
>
>
>
>
>
>

------art_115092_16364717.1154536461017--