--- On Sun, 11/23/08, Jack van Zanen <[EMAIL PROTECTED]> wrote:

> From: Jack van Zanen <[EMAIL PROTECTED]>
> Subject: Re: [PHP-DB] php5/oci8/oracle 11g1 insert doesn't work 
> ..updated..sorry
> To: [EMAIL PROTECTED]
> Date: Sunday, November 23, 2008, 7:04 AM
> HI
> 
> of the top of my head,
> 
> 
> remove the semicolon from the sql string
> 
> Brgds
> 
> Jack
> 
> 2008/11/23 Fred Silsbee <[EMAIL PROTECTED]>
> 
> > The following code doesn't do the insert.
> >
> > I've tried the insert statement in a session:
> >
> > [EMAIL PROTECTED] log_book]$ sqlplus landon/<PW>
> >
> > SQL*Plus: Release 11.1.0.6.0 - Production on Sat Nov
> 22 16:01:39 2008
> >
> > Copyright (c) 1982, 2007, Oracle.  All rights
> reserved.
> >
> >
> > Connected to:
> > Oracle Database 11g Enterprise Edition Release
> 11.1.0.6.0 - Production
> > With the Partitioning, OLAP, Data Mining and Real
> Application Testing
> > options
> >
> > SQL> select * from log_book where
> actype='B-17';
> >
> > no rows selected
> >
> > SQL> quit
> > Disconnected from Oracle Database 11g Enterprise
> Edition Release 11.1.0.6.0
> > - Production
> > With the Partitioning, OLAP, Data Mining and Real
> Application Testing
> > options
> >
> >
> > <?php // File: anyco.php
> >
> > require('anyco_ui.inc');
> >
> > $db = "(DESCRIPTION =
> >   (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT =
> 1521))
> >   (CONNECT_DATA =
> >     (SERVER = DEDICATED)
> >     (SID = LMKIIIGDNSID)
> >   )
> > )";
> > if ($conn=oci_connect('landon',
> 'PWD',$db))
> > {
> > echo "Successfully connected to
> Oracle.\n";
> >
> > }
> > else
> > {
> > $err = OCIError();
> > echo "Oracle Connect Error " .
> $err['message'];
> > }
> >
> >
> >  $stid = oci_parse($conn, 'insert into log_book
> values (
> >
> TO_DATE('08/12/1973','MM/dd/YYYY'),'B-17','N5787G',1,1.8);');
> >
> >  $r = oci_execute($stid );
> >
> >        oci_commit($conn);
> >        OCILogoff($conn);
> > echo "end";
> > ?>
> >
> > produces:  Successfully connected to Oracle.end
> >
> >
> > This is my first php/oci8/oracle insert! What could be
> simpler! HELP!
> >
> > In desperation, I used em to give myself every
> possible privilege !
> >
> > Not good but after it works, I can go back and correct
> and learn
> > privileges!
> >
> > I rebooted and tried this again to no avail.
> >
> > I suspected a commit problem but oci_execute has
> commit as default!
> >
> > The table has no primary key defined since no values
> are unique.
> >
> > I have a similar table with a row id!
> >
> >
> >
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 

Thanks! I'll try that. Something strange happened yesterday! I ran the script 
via the browser and then brought up sqldeveloper!

The table appeared NOT to be there until I closed the browser!

This is worrisome! 

Logging in via sqlplus doesn't show the table busy!!!!

I must remember the rules here to NOT top post!

Forgive me if I forget once in a while!


> -- 
> J.A. van Zanen


      


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

Reply via email to