Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: ADO (DBI) vs ADODB.Connection

by repson (Chaplain)
on Jan 10, 2001 at 08:36 UTC ( [id://50870]=note: print w/replies, xml ) Need Help??


in reply to ADO (DBI) vs ADODB.Connection

Another couple of things to try:
Can you use ODBC instead of ADO, I know I've been able to create access connections with DBD::ODBC without waiting too long, maybe just try it for comparison.
You can also try connecting to the database file on disk, without actually even needing access installed, which you can read about in the docs for DBD::ODBC.

Replies are listed 'Best First'.
Re: Re: ADO (DBI) vs ADODB.Connection
by ryddler (Monk) on Jan 10, 2001 at 21:04 UTC

    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

      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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://50870]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-16 16:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found