Hi Javier,

> I am trying to access an MS Access database via perl DBI and I am unable to. 
> I checked the security and there is only one 'Admin' user with no password 
> and I use that in my connection string. However, I cannot connect. Please 
> help.
> 

 1.  Create an ODBC  connection via %SystemRoot%\system32\odbcad32.exe
      Call the database connect name "ODBCName"

 2.   In your Perl code add:
[---]
   use DBI;
[---]
   $dbh = DBI->connect("dbi:ODBC:ODBCName",'','');
[---]
   $sth = $dbh->prepare("select * from some_tablename");
   $sth->execute || die("Could not execute SQL statement ... maybe invalid?");
   while (@row_data = $sth->fetchrow_array()) {
       print $row_data[0];     ### print first column of table  'some_tablename'
       }


...That's really about it... everything else is on an as-needed basis.
If the database is on a network drive, maybe there is some sort of 
permissions issue going on.   Post some code.

kevindot

Reply via email to