Ask a Question related to PHP Development, Design and Development.
-
Angel #1
Oracle Odbc Connection Problem
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.
Angel Guest
-
#40756 [NEW]: ODBC Oracle Connection
From: norm dot pence at gmail dot com Operating system: Windows Server 2003 Standard x64 PHP version: 4.4.6 PHP Bug Type: ... -
ODBC Connection Problem
I'm running windows XP Professional, MS SQL Server 2000 developer, IIS 5.1 and Cold Fusion MX 7 on my local machine. I get the following error... -
#25097 [Fbk->NoF]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
ID: 25097 Updated by: sniper@php.net Reported By: huenerbe at dli-11 dot vcsystem dot com -Status: Feedback... -
#25097 [Fbk]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
ID: 25097 Updated by: kalowsky@php.net Reported By: huenerbe at dli-11 dot vcsystem dot com Status: Feedback... -
#25097 [NEW]: SAPDB ODBC Connection in SQLMode=Oracle always results in no "rows"
From: huenerbe at dli-11 dot vcsystem dot com Operating system: Linux 2.4.x PHP version: 4.3.2 PHP Bug Type: ODBC related...



Reply With Quote

