[ruby-dbi-users] Thinking of trying to resurrect the ADO DBD--anybody already working on that?
Erik Hollensbe
erik at hollensbe.org
Wed Nov 25 17:17:42 EST 2009
On 11/25/2009 12:00 PM, Pardee, Roy wrote:
> Thanks much for the response Erik! The moving target thing is a bummer. Maybe I should wait?
>
> I posted close to this same message on the sqlserver-adapter google group
>
> Yesterday I started learning how to package code w/rubygems and--just for a goof--tried to gem up Neumann's old code in such a way that dbi 0.4.3 would locate& attempt to use it. Not surprisingly, it barfed w/a "dbi.rb:300:in `block in load_driver': Unable to load driver 'ADO' (underlying error: uninitialized constant DBI::DBD::ADO) (DBI::InterfaceError)". That was after 16 warnings from the Deprecated gem about methods being redefined/discarded.
>
> Not sure if that means I missed my mark in terms of the gemification/namespacing or what. Reading dbd_SPEC.rdoc now to try and get oriented...
>
> I'll see if I can figure out how to get on freenode.
>
Actually, it has more to do with coupling that DBI 0.2.x and earlier and
the DBDs had, they both expected the DBDs to be in very specific places
on the file systems, which was based on the name of the class. You can
see part of this code in 0.2.x's DBI.load_driver method. I should point
out that before 0.4.x, it was very hard to get a DBD installed that was
not already bundled with DBI (OCI8 is the only living exception I know
of that did this.. Others existed by you installed them by hand).
To repackage it, you'll actually need to modify the ADO.rb code and
create a sane build process that installs it in the proper spot, etc. It
sounds like you have half of this done, just keep on truckin'. Also,
it's not going to work at this point; 0.4.x makes other significant
changes that aren't respected by the old DBDs.
Additionally, while DBD_SPEC is still current, you're probably better
off reading the DBI::Base{Database,Statement,Driver} and
DBI::{Database,Statement,Driver}Handle documentation. I've made plenty
of notes for DBD developers in those libraries.
HTH, and please keep the line open if you have any questions. I
generally don't respond during work hours so be patient. :)
-Erik
More information about the ruby-dbi-users
mailing list