Thanks Beth and Annon,

I've ammended the code to log the conn status, as recommended by both of you, to see if I am making a connection. (BTW I tested the connection using the 'Test connection' at the end of the ODBC wizzard and that's fine.

The ammedments are...

my $conn = Win32::OLE->CreateObject('ADODB.Connection'); # Open a connection using the SQL Server OLE DB Provider # LogIt( $fhDEBUG, "Opening ADODB connection") if $CONFIG{DEBUG} > 3; $conn->Open(<<EOF); $DSN EOF # Added 07/04/09 on recomendation (Perl Monks) a check to see if DB + connection was really successfull. my $connStatus ="Not Set" if($conn->{State} == adStateOpen) { $connStatus = "Connection was a success"; } else { $connStatus = "Connection failed because "; $connStatus .= $conn->Errors(0)->{Description}; } #LogIt( $fhDEBUG, "COMPLETE: Opening ADODB connection") if $CONFIG{ +DEBUG} > 3; #changed above line to log status of connection LogIt( $fhDEBUG, $connStatus) if $CONFIG{DEBUG} > 3; # End of 07/04/09 changes

I also commented out all the extra sql lookups so that I was only making one lookup per DB... unfortunately the error now is...

CGI Timeout The specified CGI application exceeded the allowed time for processing +. The server has deleted the process.

Nothing is logged to the DEBUG file at all

I'll try some more experimenting... meanwhile if someone can spot something I've obviously missed out...let me know.

Mych
I have not failed... just found 100 ways that don't work YET!

In reply to Re^2: OLE exception from ADODB.Connection by Mych
in thread OLE exception from ADODB.Connection by Mych

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.