Re: [phplib] PHPLIB and oracle binding for >2000 characters From: Mike Green (Mike.Green <email protected>)
Date: 10/05/00

I have a similar problem.

I installed a PHPLib-based system that had worked with MySQL, made the expected
necessary changes to date formats, and thought things were working well -- until
someone tried to insert a document with more than 4000 characters. [Not 2000. at
least I have something to be thankful for ;-)]

The DBA tells me the Oracle error message that resulted comes with the solution "Use
a string literal of at most 4000 characters. Longer values may only be entered
using bind variables."

I see that the PHP library has functions which are apparently for this (e.g.
OCIBindByName). But if I have to start from scratch to try to modify db_oci8.inc,
or whatever routine is appropriate, I may not get a working solution very soon. The
whole concept of a bind variable is a new one for me.

I will much appreciate whatever tidbits on solutions to this that anyone can throw
my way!

Cheers!

Mike Green

flash wrote:

> Hi all --
>
> I'm running PHPLIB 7.2, and I'm trying to bind a php variable to an
> Oracle variable, so that I can insert lots of text into a LONG
> VARCHAR field.
>
> Has anybody run into this before? Is there any:
> - sample code
> - hints
> that show how to bind and insert a large variable into an oracle
> table, while still in the constraints of PHPLIB?
>
> I have it (kinda) working outside of PHPLIB, but I'd like to keep the
> work in PHPLIB if possible. An aggressive search of all the PHP and
> PHPLIB lists shows that only a few people have ever tried to insert
> 2000+ characters into an Oracle database field.
>
> -- flash

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>