Zend_Db ::insert error on a large file

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_Db ::insert error on a large file

chemouna
I'm running into this issue trying to pass a string data over ~1400 characters through Zend_Db. I'm doing a simple Zend_Db_Adapter_Abstract::insert :

 $data = array('blobcolumn' => $blobfile);
  $this->insert($data);

where $this is my Zend_Db table where im storing files.

The error is: ORA-01461: can bind a LONG value only for insert into a LONG column

It only happens on data with characters >~1400 in length.

any ideas on how to fix this ?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Db ::insert error on a large file

Konr Ness
Is this on an Oracle database? The error message indicates this is a
problem with Oracle, not with Zend_Db. Are you able to run the
identical query directly on the database (taking Zend_Db out of the
picture)?

Konr

On Tue, Jan 31, 2012 at 4:32 AM, chemouna <[hidden email]> wrote:

> I'm running into this issue trying to pass a string data over ~1400
> characters through Zend_Db. I'm doing a simple
> Zend_Db_Adapter_Abstract::insert :
>
>  $data = array('blobcolumn' => $blobfile);
>  $this->insert($data);
>
> where $this is my Zend_Db table where im storing files.
>
> The error is: ORA-01461: can bind a LONG value only for insert into a LONG
> column
>
> It only happens on data with characters >~1400 in length.
>
> any ideas on how to fix this ?
>
> Thanks.
>
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Db-insert-error-on-a-large-file-tp4344059p4344059.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>
> --
> List: [hidden email]
> Info: http://framework.zend.com/archives
> Unsubscribe: [hidden email]
>
>

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Zend_Db ::insert error on a large file

chemouna
This post was updated on .
thanks for replying , yes im able to do it using the same query directly in my database , i also got it working using simple php (creationg a descriptor with oci_new_descriptor and binding to a lob object and then saving my lob file )
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Db ::insert error on a large file

Konr Ness
Try turning on DB profiling so you can see what the actual DB query
that is occurring is. I suspect the actual query differs from what you
are expecting it to be. This may help narrow down what the problem is.

Konr

On Wed, Feb 1, 2012 at 2:58 AM, chemouna <[hidden email]> wrote:

> yes im able to do it using the same query directly in my database , i also
> got it working using simple php (creationg a descriptor with
> oci_new_descriptor and binding to a lob object and then saving my lob file )
>
>
> --
> View this message in context: http://zend-framework-community.634137.n4.nabble.com/Zend-Db-insert-error-on-a-large-file-tp4344059p4347272.html
> Sent from the Zend DB mailing list archive at Nabble.com.
>
> --
> List: [hidden email]
> Info: http://framework.zend.com/archives
> Unsubscribe: [hidden email]
>
>

--
List: [hidden email]
Info: http://framework.zend.com/archives
Unsubscribe: [hidden email]