Open Access file on linux

Asked

Viewed 335 times

0

By connection , as I change my DSN ?

one of the cases in my connection class that opens file in access

case "fatura" :
            $strHost = "";
            $strUser = "";
            $strPass = "";
            $strBase = "";
            $strType = "";
         $strDSN  = "odbc:DRIVER={Microsoft Access Driver (*.mdb)};charset=iso-8859-1; DBQ={$strArquivo}; Uid=; Pwd=;";
        //$strDSN  = "odbc:DRIVER=Driver{Easysoft ODBC-ACCESS};charset=iso-8859-1; DBQ={$strArquivo}; Uid=; Pwd=;";
            break;

I tried to change the DSN to receive the Easysoft ODBC-ACCESS driver because what I searched on linux does not open odbc files, but at first unsuccessfully, what could it be?? or what is missing

The message it displays is :

"RepositorioException: Nao foi possivel conectar ao banco de dados: SQLSTATE[01000] SQLDriverConnect: 0 [unixODBC][Driver Manager]Can't open lib 'Microsoft Access Driver (*.mdb)' : file not found","location":""}
  • This Easysoft ODBC-ACCESS driver no longer works ... so I researched it would have some,that I could add in Ubuntu , and put in my DSN ?

1 answer

2

I think the message makes it very clear that it is "file not found":

SQLSTATE[01000] Sqldriverconnect: 0 [unixODBC][Driver Manager]Can’t open lib 'Microsoft Access Driver (*.mdb)' : file not found

It’s probably a case-sensitive problem, on Linux and Unix-based systems (like Mac OSX), if you put something like:

 $strArquivo = 'Arquivo.mdb';

And in the briefcase he’s like this arquivo.mdb, will not work. In Windows is case-Insensitive, ie in Windows arquivo.mdb is equal to Arquivo.mdb (is not something connected to PHP is an operating system issue).

Read this: PHP on linux or windows

Another problem may simply be that it points to an invalid path.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.