I am using activestate version 5.8 on XP with DBI 1.38. I am trying to
return values into an associative array so that I don't keep needing to
connect to the database. I am new to perl and DBI is looking like rocket
science. The code below has been gleaned from the Internet so I am not
completely sure what is going on.

Basically I need to read the values into the array so that they can be
called anywhere within the script. When I use print " drop folder $queue
{'cch'}\n";  as a test for a known value i get a nil value.

Any help would be much appreciated.

Cheers

Neill


sqlstatement="SELECT KeyName,[Value] FROM ConfigTable where SectionName
= 'OPIQ'"; #Select rows from table
            $sth = $dbh->prepare($sqlstatement);
                $sth->execute ||
                    die "Could not execute SQL statement ... maybe
invalid?";
                      while (my $opi = $sth->fetchrow_hashref){
                                    my %queue = $opi
                      };










********************
IMPORTANT NOTICE  This email (including any attachments) is meant only for the 
intended recipient. It may also contain confidential and privileged information.  If 
you are not the intended recipient, any reliance on, use, disclosure, distribution or 
copying of this email or attachments is strictly prohibited. Please notify the sender 
immediately by email if you have received this message by mistake and delete the email 
and all attachments. 

Any views or opinions in this email are solely those of the author and do not 
necessarily represent those of Trinity Mirror PLC or its associated group companies 
(hereinafter referred to as "TM Group"). TM Group accept no liability for the content 
of this email, or for the consequences of any actions taken on the basis of the 
information provided, unless that information is subsequently confirmed in writing. 
Although every reasonable effort is made to keep its network free from viruses, TM 
Group accept no liability for any virus transmitted by this email or any attachments 
and the recipient should use up-to-date virus checking software. Email to or from this 
address may be subject to interception or monitoring for operational reasons or for 
lawful business practices. 

Trinity Mirror PLC is the parent  company of the Trinity Mirror group of companies and 
is registered in England No 82548, with its address at One Canada Square, Canary 
Wharf, London E14 5AP. 
********************

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to