i'm trying to connect to a oracle database using the odbc driver with the
followin script:
<?php        $user="user";    $upasswd="password";    $dsn = "dsn";
    $query = "select sysdate from dual";    print "<p>query is:
<code>$query</code><br>";       $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
11how can i make this script work perfectly?

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to