[PHP-DEV] RE: Bug #10660 Updated: OCIBindByName

2001-05-08 Thread Ajmer . Phull

proved it was the cause of the problem by re-creating our table without CHAR
fields. Worked successfully. There must be some settings different on our
system, either with Oracle or PHP. I will have a look into this. 

-- 
PHP Development 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]




[PHP-DEV] RE: Bug #10660 Updated: OCIBindByName

2001-05-08 Thread Ajmer . Phull

try an UPDATE instead of an INSERT

-- 
PHP Development 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]




[PHP-DEV] Bug #10660: OCIBindByName

2001-05-04 Thread ajmer . phull

From: [EMAIL PROTECTED]
Operating system: IBM AIX v4.3.3
PHP version:  4.0.4pl1
PHP Bug Type: OCI8 related
Bug description:  OCIBindByName

SERVER: IBM AIX v4.3.3
PHP v4.0.4pl1
APACHE v1.3.19
Oracle 8i Enterprise release 8.1.7.0.0

CLIENT: DELL Intel P2
Windows NT 4.0 SP6.0a

I have created a function to update fields on the database using textboxes.

The sql statement contains parameters that obviously require binding. 

I have succussfully updated several tables and fields, but whenever the field type is 
CHAR() then the update does not occur and NO errors are generated.

I have performed the following to try and narrow down the problem:

Removed every parameter from the sql statement and hardcoded values, (no need to 
perform a bind) and this updated succussfully.

Replaced a single parameter and performed a bind for that parameter and this updated 
succussfully, but only where the field being updated was NOT a CHAR()

Here is the function stripped down:

function Save_Details($conn)
{

  $sql= update staticdata2 set   
  description = :td   
  where tableref2 = :tr  
  and upper(tablecode2) = :tc ;
  
  if (!($qry = @OCIParse($conn, $sql)))
  {
$err = OCIError($conn);
OCILogoff($conn);
$m_msg=span class=error . __LINE__ . : Error  . $err[message] . ./span;
return;
  }
  
  echo(!-- $code $description $tableref --\n);
  
  OCIBindByName($qry, :tc, $code, 3);
  OCIBindByName($qry, :td, $description, 41);
  OCIBindByName($qry, :tr, $tableref, 4);
  
  if (!@OCIExecute($qry))
  {
$err = OCIError($qry);
OCIFreeStatement($qry);
OCILogoff($conn);
$m_msg=span class=error . __LINE__ . : Error  . $err[message] . ./span;
return;
  }

  OCIFreeStatement($qry);  

}


-- 
Edit Bug report at: http://bugs.php.net/?id=10660edit=1



-- 
PHP Development 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]