Getting the error message:
Can't call method FETCH on an undefined value at D:/Perl/site/lib/Win32/TieRegistry.pm line 1486 during global destruction.
Here is what is the part under suspicion:
print LOGFILE "$SQL_login"; # $cursor_login = $dbh_login->prepare($SQL_login) # || die "Couldn't prepare statement: " . $dbh_login->errstr; print LOGFILE " made it $cursor_login"; #$cursor_login->execute; #@fields_login = $cursor_login->fetchrow; $validid_login = $fields_login[0]; print LOGFILE " element is $validid_login"; $firsttime_login = $fields_login[1]; print LOGFILE " element is $firsttime_login"; #$cursor_login->finish; #Close the database $dbh_login->disconnect;
Here's the whole code:
#!c:/perl/bin -w BEGIN { push (@INC, "c:/progra~1/unwire~1/UPSDKH32/examples/apputils") +; } open (LOGFILE, ">/logs/reclaim.log"); # Load required application utilities require 'HDMLUtils.pl'; #use vars qw{$SPLASHSCREEN_login}; $SPLASHSCREEN_login = '<HDML VERSION=3.0 MARKABLE=TRUE TTL="0"> <ACTION TYPE=ACCEPT LABEL=OK TASK=GO DEST="?NEXT=LOGIN"> <DISPLAY TITLE="Mobile Media Portal"> <CENTER>%s %s %s </DISPLAY> </HDML>'; #Call the main function to begin execution &Main; ###################################################################### +###### # # Subroutine Name: Main # # Purpose: Parse the CGI variables into the cgiVars hash and cotrols # component navigation based on $nextState # ###################################################################### +###### sub Main { $subid_login=$ENV{'HTTP_X_UP_SUBNO'}; my ($dbh_login, $SQL_login, $cursor_login, @fields_login, $validid_lo +gin, $firsttime_login); # This Tells PERL to use the Database Interface use DBI; # Establish DataBase handle $dbh_login = DBI->connect("dbi:Oracle:tyson", "scott","tiger", {PrintError => 0}) || die $DBI::errstr; # $dbh_login = DBI->connect("dbi:Oracle:kcmmp", "widl","widl", # {PrintError => 0})|| die $DBI::errstr; # Setup STATIC query string $SQL_login = "select SUBSCRIBERID, FIRSTTIME from CTIA_SUBSCRIBERID where SUBSCRIBERID = '$subid_login'"; print LOGFILE "$SQL_login"; # $cursor_login = $dbh_login->prepare($SQL_login) # || die "Couldn't prepare statement: " . $dbh_login->errstr; print LOGFILE " made it $cursor_login"; #$cursor_login->execute; #@fields_login = $cursor_login->fetchrow; $validid_login = $fields_login[0]; print LOGFILE " element is $validid_login"; $firsttime_login = $fields_login[1]; print LOGFILE " element is $firsttime_login"; #$cursor_login->finish; #Close the database $dbh_login->disconnect; &AppUtils::OutputDeck(sprintf($SPLASHSCREEN_login, "Made it here", $validid_login)); #$subid_login, $firsttime_login }
Thanks in advance you rule.

In reply to Basic-- Error by Anonymous Monk

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.