Advertisement

08.24.2005 at 11:03AM PDT, ID: 21538745
[x]
Attachment Details

Remote Database, able to SELECT, unable to INSERT

Asked by maximteo in Oracle Database

Tags: database, remote, insert, select

I'm using PHP to access a remote Oracle database;

function select(){
 $conn = ocilogon($username,$password,$sid);

$s = ociparse($conn, "SELECT * FROM table1");
ociexecute($s, OCI_DEFAULT);
while (ocifetch($s)){
    echo ociresult($s, "LABEL");
}

function insert(){
 $conn = ocilogon($username,$password,$sid);
$s = ociparse($conn, "INSERT INTO table1(LOCATION,PATH,LABEL) VALUES (12345, '/home/koko', 'testlabel');
ociexecute($s, OCI_DEFAULT);
}

The problem is this, when i call the function select(), it prints out the data from table1.
when i call insert(), no error is returned but nothing is inserted when i do a select() after i call the insert();

any ideas ?Start Free Trial
[+][-]08.24.2005 at 11:10AM PDT, ID: 14745243

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2005 at 11:13AM PDT, ID: 14745263

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle Database
Tags: database, remote, insert, select
Sign Up Now!
Solution Provided By: DrSQL
Participating Experts: 2
Solution Grade: B
 
 
[+][-]08.24.2005 at 11:13AM PDT, ID: 14745267

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2005 at 11:16AM PDT, ID: 14745307

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2005 at 11:27AM PDT, ID: 14745419

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2005 at 11:39AM PDT, ID: 14745594

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.24.2005 at 11:54AM PDT, ID: 14745761

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32