Re: ASP => PHP

From: Date: Wed, 06 Sep 2000 12:17:45 +0000
Subject: Re: ASP => PHP
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2456@lists.php.net to get a copy of this message
Please, help me ! Como transformar os comandos abaixo (ASP) para (PHP) ? In ASP : <% set conntemp=server.createobject("adodb.connection") cnpath="DBQ=" & server.mappath("alacr.mdb") conntemp.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath . . conntemp.close %> In PHP : (DON'T WORK) I tried the following : <?php $cnpath = "DBQ=c:\apache\wwwroot\alacr.mdb"; $driver = "DRIVER={Microsoft Access Driver (*.mdb)}; "; $dsn = $driver.$cnpath; $usuario = ""; $senha = ""; $connect = odbc_pconnect($dsn, $usuario, $senha); . . odbc_close($connect); ?> Thank you Alvaro Luiz In my opinion you have to specify the DSN via the Control panel. You assign a name to the DSN, and that name you pass to the odbc_pconnect function.

« previous php.windows (#2456) next »