My script does an sql query on a Microsoft Access DB, then prints out that data in a 
format that Flash can read: 

#!C:\Perl\bin\perl.exe

use DBI;
use CGI;

$query = new CGI;
$osbid = $query->param('osbid');

$dbh = DBI->connect('dbi:ODBC:OSB') 
 || die $DBI::errstr;  #connect to database
 
$sqlstatement = "SELECT 
VARIATIONRULES.ID,VARIATIONRULES.Offset,VARIATIONRULES.Variation,VARIATIONRULES.VariationMethod,ITEMS.Price
 FROM VARIATIONRULES,ITEMS WHERE ITEMS.ID=$osbid AND VARIATIONRULES.Item=$osbid ORDER 
BY VARIATIONRULES.ID";

$sth = $dbh->prepare($sqlstatement);
$sth->execute || die $DBI::errstr;

print "Content-type: text/html\n\n";
 print "\&variations\=";
 while($row=$sth->fetchrow_hashref){
  $overall = ($row->{Offset})+($row->{Price});
  print 
"$row->{ID},$row->{Variation},$row->{VariationMethod},$row->{Offset},$row->{Price},$overall\*";
 }
 print "\&";
$rc  = $dbh->disconnect;

and its really strange, it was working for a little while just fine, and then all the 
sudden it stopped. if i take out the '$rc = $dbh->disconnect;' it works for some but 
not for others. If i use it how it is, and watch the prosseses on the server it runs 
on... perl.exe runs and just stays running, never stops. and if i watch the .mdb file, 
when the script runs, the database lock file(.ldb) shows up, so i know that the db was 
opened. it just never finished the query, or it froze up, OR SOMETHING :(
does the anonymous user on the server(the one that IIS uses for anon internet access) 
have to have special permissions to close a DB?
if anyone can help me out on this subject, i would forever be in your debt :)

nate brunson
[EMAIL PROTECTED]

Reply via email to