Oracle Odbc Connection Problem

From: Date: Mon, 21 Jul 2003 21:22:37 +0000
Subject: Oracle Odbc Connection Problem
Groups: php.general 
Request: Send a blank email to php-general+get-156149@lists.php.net to get a copy of this message
I'm trying to connect to a oracle database using the " Microsoft ODBC for Oracle " driver with the followin script: <?php $user= "user"; $upasswd="password"; $dsn = "dsn"; $query = "select sysdate from dual"; $conn = odbc_pconnect($dsn, $user,$upasswd ); if (!$conn) { print "Connection failed\n</html>"; exit; } if ($result = odbc_Exec($conn, $query)) { print "Query returned : " . odbc_num_rows($result) . " rows"; odbc_result_all($result, "border = 1"); } ?> And received the following error: Warning: SQL error: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve service name, SQL state 08001 in SQLConnect in c:\php\files\p.php on line 6 Can any body help With this error. Wha i have to set for connecting with oracle using odbc? Regards, Angel M.S.F.

« previous php.general (#156149) next »