odbc in windows 2000 IIS 5.0
| From: | Angel Behar Rodriguez | Date: | Mon, 31 Jul 2000 19:06:20 +0000 |
| Subject: | odbc in windows 2000 IIS 5.0 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9261@lists.php.net to get a copy of this message | ||
I just installed PHP 4.01 under windows 2000 and IIS.
Before I was running php under windows 98 w/pws and used odbc conections
to dbf files
but now I create the DSN and everything and I can not make the file works.
This is the error.
Warning: SQL error: [Microsoft][ODBC Driver Manager] Data source name not
found and no default driver specified, SQL state IM002 in SQLConnect in
c:\Inetpub\wwwroot/odbc3.php on line 2
here is the code :
<?
$cnx = odbc_connect( 'PICSA' , 'root', '' );
if( ! $cnx )
{
echo "Error en odbc_connect";
}
$cur= odbc_exec( $cnx, "select nombre, saldo from Cierre24.dbf " );
if( ! $cur )
{
echo "Error en odbc_exec";
}
$nbrow=0;
while( odbc_fetch_row( $cur ) )
{
$nbrow++;
$nombre= odbc_result( $cur, 1 );
$saldo= odbc_result( $cur, 2 );
echo "nom$nbrow=$nombre&sal$nbrow=$saldo&";
}
odbc_close( $cnx);
?>
Thanks in advance for your help.
---------------------------------------------------------------------------
Ing. Angel Behar R. | "The box says : Windows 98, Windows NT or BETTER
Tel : (67) 15-15-15 | That's why I installed FreeBSD"
---------------------------------------------------------------------------