in reply to Re: ADO (DBI) vs ADODB.Connection
in thread ADO (DBI) vs ADODB.Connection

Thanks for the suggestion. I plugged in "ODBC" into the first listing from above like below, and my connection times dropped to 0 (zero) like those of the second listing above.

use DBI; $start = time; $dbh_metro = DBI->connect("dbi:ODBC:metro"); $finish = time - $start; $Response->write("<CENTER><H2>took $finish seconds to connect DB</H2>< +/CENTER>\n");

So this means that myself and anyone else who wishes to use PerlScript vs VB writing ASP's should be using the ODBC with DBI instead of ADO. Let's look at those numbers again...

DBD::ODBC 0 - 1 second Perl Style DB access methods :-)
DBD::ADO 30 - 40 seconds Perl Style DB access methods :-)
'ADODB.Connection' 0 - 1 second MS Style DB access methods :-(

Update: After some serious hair pulling about why my machine was unexpectedly rebooting itself whenever I tried to compile anything, or run the Beta of Komodo, I discovered that the antivirus program was causing not only the reboot problems, but actually caused the ADO time to increase as shown in the chart. Actual ADO times without A/V running are the same as the other two methods.

ryddler

Replies are listed 'Best First'.
($code or die) Re: Re: Re: ADO (DBI) vs ADODB.Connection
by $code or die (Deacon) on Jan 10, 2001 at 23:35 UTC
    I've noticed this before comparing Win32::ODBC and ADODB.Connection

    I haven't got around to using the (more perlish way) of DBI, because I haven't had the time. But where I work, and the projects I've been working on using the ADO component with OLE has not been a problem. (I suppose this is mainly because everyone else here uses that with ASP - I'm in the minority using Perl.

    Still I want to get round to using DBI, so this post has been useful to me because I'll try out DBD::ODBC first!