I read throught the oracle php cookbook and probably searched on the
wrong searchterms ;) Thanks for the response. I encountered such an
example of binding here:
http://www.oracle.com/technology/pub/articles/oracle_php_cookbook/fuecks_lobs.html
eg:
<?php
// etc.
$sql = "INSERT INTO
mylobs
(
id,
mylob
)
VALUES
(
mylobs_id_seq.NEXTVAL,
:string
)
";
$stmt = oci_parse($conn, $sql);
$string = 'INSERT: '.date('H:i:s',time());
oci_bind_by_name($stmt, ':string', $string);
oci_execute($stmt)
or die ("Unable to execute query\n");
// etc.
?>
I was trying this last night but there seems to go something wrong
when i execute sql in my model...
On 5 dec, 09:28, AD7six <[EMAIL PROTECTED]> wrote:
> On Dec 5, 1:28 am, sanderken <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hello everybody.
>
> > After a long quest on the internet and through the cakephp API, I
> > can't find a solution to my problem .
>
> > Here goes:
> > Cakephp is working great with my oracle database. Now I want to store
> > messages > 4000 chars (VARCHAR2). So I want to go with a CLOB.
>
> > When I fill the data straight in the database with some 20k
> > characters , all happens as wanted: model reads the CLOB and prints
> > it. No problem.
>
> > Now the REAL problem: I can't get the data BACK into the database !
>
> > This is the error: Warning (2): ociexecute() [function.ociexecute]:
> > ORA-01704: string literal too long [CORE/cake/libs/model/datasources/
> > dbo/dbo_oracle.php, line 291]
>
> > Help would be greatly appreciated !
>
> At a guess you need to use a bind variable. as result one says
> here:http://www.google.es/search?q=ORA-01704%3A+string+literal+too+long
>
> As
> doeshttp://download.oracle.com/docs/cd/B10501_01/server.920/a96525/e1500.htm
>
> So where did you go with your quest ;)?
>
> AD- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---