Hi Doug,

This works for me..

putenv("ORACLE_SID=MYINSTANCE");
$uid = "MYUSERID";
$pwd = "MYUSERPASSWD";
$inst = "MYINSTANCE";
$conn = ocilogon($uid,$pwd,"$inst");
if(!$conn):
  echo "unable to connect to database";
  ocilogoff($conn);
endif;
$query= "alter session set NLS_DATE_FORMAT = 'DD-MON-YYYY'";
$curs = ociparse($conn,$query)  or die( "Unable to parse query" );
ociexecute($curs)  or die( "Unable to execute query" );


HTH
Steve

At 11:49 PM -0600 4/2/01, Doug Schasteen wrote:
>Am I blind? Or is there no support with the regular oracle functions 
>to connect to a database that is hosted on another machine?
>
>The manual has this:
>
>$conn = Ora_Logon(username, password);
>
>but I don't see anywhere to put the host string.
>
>- Doug Schasteen

-- 
---------------------------------------------------
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED]     Tel: 612 9982 6767     Fax: 612 9981 3081 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to