Oracle Database Connection Error

From: Date: Fri, 18 Jul 2003 16:54:20 +0000
Subject: Oracle Database Connection Error
Groups: php.db 
Request: Send a blank email to php-db+get-29338@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.db (#29338) next »