Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Re:Problem connecting to the remote oracle using PHP and ADODB

    Hi All,
    I really need help on the following code . I'm connecting to remote oracle with the following code. Can you tell me what's going wrong. I am not being able to connect to the oracle.

    Code:
    $DSN="oci8://".USERNAME.":".PASSWORD."@".HOST."/".SID;
    $DB=NewADOConnection($DSN);
    $DB->debug = 1;
    Then I am using this code:
    Code:
    $res	=	$DB->Execute($sql) or die($DB->ErrorMsg());
    It is showing error:
    Fatal error: Call to undefined method stdClass::Execute()

    I would be greatly obliged if you can share me some light on this...

    Thanks in advance,
    Always blame on me..

  • #2
    Regular Coder
    Join Date
    May 2006
    Location
    Wales
    Posts
    820
    Thanks
    1
    Thanked 82 Times in 79 Posts
    PHP Code:
    $DB=NewADOConnection('oracle');
    $db->Connect($host$user$password$database);
    $res = &$db->Execute($sql); 
    Explained here

  • #3
    New Coder
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    Quote Originally Posted by Mwnciau View Post
    PHP Code:
    $DB=NewADOConnection('oracle');
    $db->Connect($host$user$password$database);
    $res = &$db->Execute($sql); 
    Explained here
    This is ok when you are connecting to the local database but not the remote database. For remote database you must require the host and the SID. Without it the connection cannot happen. Anyway thanks for the posting, I really appreciate it.
    Always blame on me..

  • #4
    New Coder
    Join Date
    Feb 2006
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation

    Hi all,

    I really need some help on this. Can't anyone help me out on this??
    Always blame on me..


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •