> Using the filemonitor utility (thanks to Tim for the suggestion) I noticed
> that  an access denied error was occuring on the following file create:
> c:\WINNT\JETxxx.tmp when logged in as anonymous intrnet user via CGI.
Change the DefaultDir connection string attribute (or the option in the advanced
section of the DSN Setup) to a folder you know everyone can use (say c:\temp)
and make sure everyone has change on it.  Once you've done that try the
following (test script attached):

C:\>cacls c:\temp /D %USERNAME%
Are you sure (Y/N)?y
processed dir: c:\temp

C:\>odbc.pl
Error connecting to 'DRIVER={Microsoft Access Driver (*.mdb)};DBQ=C:\Program Fi
es\Microsoft Office\Office\Samples\Northwind.mdb;DefaultDir=C:\temp'
Error: [0] [0] "" []

C:\>cacls c:\temp /G EVERYONE:C
Are you sure (Y/N)?y
processed dir: c:\temp

C:\>odbc.pl
Tables: Categories,Customers,Employees,Order Details,Orders,Products,Shippers,S
ppliers

--
  Simon Oliver

#!perl -w
use strict;
use Win32::ODBC;

use vars qw($dbq $dsn $db $sql $where $crieria);

$dbq = 'C:\\Program Files\\Microsoft Office\\Office\\Samples\\Northwind.mdb';
$dsn = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=$dbq;DefaultDir=C:\\temp";
$crieria = $ARGV[0] || '%';
$where = "CompanyName LIKE '$crieria'";

if (!($db = new Win32::ODBC($dsn))){
    print "Error connecting to '$dsn'\n";
    print "Error: " . Win32::ODBC::Error() . "\n";
    exit;
}

my @tables = $db->TableList('','','','TABLE');
print "Tables: ", join(',', @tables), "\n";

$db->Close();

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to