Fredrik Stark wrote:

> Hi,
> Im using php4.0.3pl1 on a NT5 with an Access 2000 database.
> I use the database to store text and numbers. I just realised that
> the text-field can only store 255 characters so I changed the
> type from "text" to "memo". And now i get "Syntax Error" when
> i try to insert a value to the "memo" field...
> 
> Anyone got a solution?
> 
> /stark

You probably can't pass your value literally. Try using SQL Parameters:

<?php
$stmt = odbc_prepare($conn, "insert into foo (memocolumn, numbercolumn) 
values(?,?)");
$parameters[] = "Some long text";
$parameters[] = 123;
odbc_execute($stmt,$parameters);
?>

See also the manual entries for odbc_prepare() / odbc_execute().

-Andreas

-- 
Andreas Karajannis
mediaworx berlin  AG

Fon (0 30) 2 75 80 - 266
Fax (0 30) 2 75 80 - 200


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

Reply via email to