Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: MySQL ODBC under Windows hangs

by vek (Prior)
on Nov 17, 2005 at 06:22 UTC ( #509304=note: print w/replies, xml ) Need Help??


in reply to MySQL ODBC under Windows hangs

Also, I've studied the SQL.LOG after running the Perl CGI app, and it appears that all connections and queries performed correctly. It's just that no results appear in the browser, and then the server times out.

If you've verified in the logs that the connections and queries from Perl are ok then I don't think your connection string is the problem. Have you tried dumping the query results to a file to verify that the query is indeed working and you are getting the expected data returned? Could you post some more Perl code so we can see how you are gathering the query results?

-- vek --

Replies are listed 'Best First'.
Re^2: MySQL ODBC under Windows hangs
by Stephen Toney (Sexton) on Nov 17, 2005 at 16:24 UTC
    vek -- thanks for the reply.

    Here's a tiny program the shows the problem. This snippet works with SQL Server and Foxpro db's using ODBC.
    #! /usr/local/bin/perl -w use strict; use CGI qw(:standard escapeHTML); $::DSN = "MWEBMYSQL"; use DBI; $::dbh = DBI->connect ("dbi:ODBC:$::DSN", "ODBC") || die ("Cannot conn +ect to Data Source '$::DSN'"); my ($count) = $::dbh->selectrow_array ("select count(*) from logon"); print header ('text/html', '200 OK'); print "<html><body>Found $count records in LOGON</body></html>";
    When I run this from the command line (instead of as a web app), the correct results are shown, but the cursor stays right after </html> and I never get back to a command prompt.



    "marto" suggested (thanks!) that I should use DBD::MySQL. However, the latest on the ActiveState website is version 2.1004, November 16, 2001. Has anyone tried this with MySQL 5.0 yet?

    Thanks a million for any ideas!

    Stephen

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://509304]
help
Chatterbox?
[Corion]: Whoa! Somebody forwarded the AnyEvent::Impl:: Prima loop to schmorp and he's even interested in maintaining it himself - that'd be highly convenient for me ;)
[Corion]: (I also have a mail by dk who suggests some additions, which I should add this evening)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2016-12-09 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (151 votes). Check out past polls.