Debug stagewise. If you think the DB is corrupt then why don't you just... Open the database in Microsoft Access, click on the 'Tools' menu and select 'Database Utilities -> Compact and Repair Database'. That will do the repair (if needed) for you.

Next see if you can do a SELECT * from table WHERE lastname LIKE 'A%' directly in Access. This should show you all the lastname A's in your table. If this works then try it with DBI and see if it flies.

If it still does not work then details of you code would be useful. Are you checking return values for instance? Is it a simple time out issue due to a huge return of names? Have you added some print's so you know exactly which line of code is causing the hang?

use CGI; use DBI; my $q = new CGI; my $debug = 1; $debug && print $q->header; $debug && print '<pre>'; $debug && print "connecting.....\n"; my $dbh = DBI->connect(.....); $debug && print "connected\n"; # yada yada

What files are left in your cgi-bin. Where is the DB located. What version of Access, DBI, DBD-OBCD, Perl, Apache. yada yada

There are not a lot of good resons to use a DB as pedestrian as M$ Access for anything serious IMHO. Have you considered using something (almost anything) else? There is a good port of MySQL for Win32 for desktop use and this DB is also proven to work well on the web. Access is not M$ flagship product, SQL Server is so Access is effectively the Windows XP Home of databases. Actually probably the WinME or Win3.0 would be more accurate.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print


In reply to Re: DBI ODBC CGI Access hangs on execution of select statement by tachyon
in thread DBI ODBC CGI Access hangs on execution of select statement by buttroast

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.