Ask a Question related to Informix, Design and Development.
-
Gustavo Brown #1
Updating a Long VarChar field
Hi,
I'm having problems to update a LONG VARCHAR field.
Suppose I have a table with two fields (the key field named TheKey, and a
long varchar field, named LongVarChar)
I use this sql sentence for updation: UPDATE TEST SET LongVarChar='Test'
but I get the following message:
java.sql.SQLException: A blob data type must be supplied within this
context.
at com/informix/jdbc/IfxSqli.errorDone (IfxSqli.java)
at com/informix/jdbc/IfxSqli.receiveError (IfxSqli.java)
at com/informix/jdbc/IfxSqli.receiveMessage (IfxSqli.java)
...
...
Is there any way to do this update. I have tried to update in a row-by-row
basis, and it seems to work, but I want to update all the rows at once.
Am I missing something ? Any hints would be appreciated.
Regards,
G. Brown
Gustavo Brown Guest
-
#25544 [Ver->Bgs]: Only 255 characters returned from varchar field
ID: 25544 Updated by: abies@php.net Reported By: snick at getart dot ru -Status: Verified +Status: ... -
#25544 [Bgs->Opn]: Only 255 characters returned from varchar field
ID: 25544 Updated by: abies@php.net Reported By: snick at getart dot ru -Status: Bogus +Status: Open... -
#25544 [Opn->Bgs]: Only 255 characters returned from varchar field
ID: 25544 Updated by: iliaa@php.net Reported By: snick at getart dot ru -Status: Open +Status: Bogus... -
#25544 [NEW]: Only 255 characters returned from varchar field
From: snick at getart dot ru Operating system: Windows 2003 Server PHP version: 4.3.2 PHP Bug Type: MSSQL related Bug... -
Varchar (8000)...long XML String??
Hello, I have get a XML String that has 30,000 characters in a SQL SP. How can I do that taking under consideration that I can't use a text... -
Gustavo Brown #2
Re: Updating a Long VarChar field
When I said 'LONG VARCHAR' field I really meant 'TEXT field', i.e. the field
I am having trouble to update is a TEXT field.
Regards,
G.Brown
"Gustavo Brown" <alegusTakeOffThisAndThisadinet.com.uy@QuitThisToo .Now>
wrote in message news:bh8obm$m9$1@newsreader.mailgate.org...LongVarChar='Test'> Hi,
> I'm having problems to update a LONG VARCHAR field.
> Suppose I have a table with two fields (the key field named TheKey, and a
> long varchar field, named LongVarChar)
>
> I use this sql sentence for updation: UPDATE TEST SET> but I get the following message:
>
> java.sql.SQLException: A blob data type must be supplied within this
> context.
> at com/informix/jdbc/IfxSqli.errorDone (IfxSqli.java)
> at com/informix/jdbc/IfxSqli.receiveError (IfxSqli.java)
> at com/informix/jdbc/IfxSqli.receiveMessage (IfxSqli.java)
> ...
> ...
>
> Is there any way to do this update. I have tried to update in a row-by-row
> basis, and it seems to work, but I want to update all the rows at once.
> Am I missing something ? Any hints would be appreciated.
>
> Regards,
> G. Brown
Gustavo Brown Guest
-
Jonathan Leffler #3
Re: Updating a Long VarChar field
Gustavo Brown wrote:
> When I said 'LONG VARCHAR' field I really meant 'TEXT field', i.e. the field
> I am having trouble to update is a TEXT field.
That's a big difference!
Fundamentally, there are no blob (BYTE or TEXT - or BLOB or CLOB)
literals. That is a pain (big pain), but so. It means your only
chance of getting it to work is to replace the SQL with:
UPDATE Test SET TextColumn = ?
You then have to supply the value of the TEXT column when you execute
the statement. You probably have to set it up, too. And at that
point, my limited knowledge of JDBC shows -- I don't know what the
steps are to create a BYTE or TEXT host variable are in Java/JDBC.
> Gustavo Brown wrote:>>> I'm having problems to update a LONG VARCHAR field.
>>Suppose I have a table with two fields (the key field named TheKey, and a
>>long varchar field, named LongVarChar)
>>
>>I use this sql sentence for updation: UPDATE TEST SET
> LongVarChar='Test'
>>>but I get the following message:
>>
>>java.sql.SQLException: A blob data type must be supplied within this
>>context.
>> at com/informix/jdbc/IfxSqli.errorDone (IfxSqli.java)
>> at com/informix/jdbc/IfxSqli.receiveError (IfxSqli.java)
>> at com/informix/jdbc/IfxSqli.receiveMessage (IfxSqli.java)
>> ...
>> ...
>>
>>Is there any way to do this update. I have tried to update in a row-by-row
>>basis, and it seems to work, but I want to update all the rows at once.
>>Am I missing something ? Any hints would be appreciated.
--
Jonathan Leffler #include <disclaimer.h>
Email: [email]jleffler@earthlink.net[/email], [email]jleffler@us.ibm.com[/email]
Guardian of DBD::Informix v2003.04 -- [url]http://dbi.perl.org/[/url]
Jonathan Leffler Guest



Reply With Quote

