Skip to main content



      Home
Home » Modeling » EMF » [CDO] Type for text more than 255
[CDO] Type for text more than 255 [message #521778] Thu, 18 March 2010 13:36 Go to next message
Eclipse UserFriend
Hi all,
I have problem when try to store a text more than 255 because type at H2Database is Varchar and at the model i use EString.

i get this error message :
[ERROR] org.h2.jdbc.JdbcSQLException: Wert zu gross / lang für Feld CONTENT VARCHAR(32672): STRINGDECODE('\r\n========================================== ========================\r\n\r\nPayPal\r\n\r\n============== ========... (166933)
3 Value too long for column CONTENT VARCHAR(32672): STRINGDECODE('\r\n========================================== ========================\r\n\r\nPayPal\r\n\r\n============== ========... (166933); SQL statement:

anyone can give me some suggestion to solve this problem ?
what should i use for data type at the model

Thanks,

CanA

[Updated on: Thu, 18 March 2010 23:10] by Moderator

Re: Type for text more than 255 [message #521792 is a reply to message #521778] Thu, 18 March 2010 09:20 Go to previous messageGo to next message
Eclipse UserFriend
CanA,

Please prefix your questions with [CDO] when they are specific to CDO.


Rencana Tarigan wrote:
> Hi all, I have problem when try to store a text more than 255 because
> type at H2Database is Varchar and at the model i use EString.
>
> i get this error message :
> [ERROR] org.h2.jdbc.JdbcSQLException: Wert zu gross / lang für Feld
> CONTENT VARCHAR(32672):
> STRINGDECODE('\r\n==========================================
> ========================\r\n\r\nPayPal\r\n\r\n==============
> ========... (166933)
> 3 Value too long for column CONTENT VARCHAR(32672):
> STRINGDECODE('\r\n==========================================
> ========================\r\n\r\nPayPal\r\n\r\n==============
> ========... (166933); SQL statement:
>
> anyone can give me some suggestion to solve this problem ?
> what should i use for data type at the model
>
> Thanks,
>
> CanA
Re: Type for text more than 255 [message #521833 is a reply to message #521778] Thu, 18 March 2010 16:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi Rencana,

I'm not a database expert or H2 in particular. Hopefully others can jump
in. Stefan?

Cheers
/Eike

----
http://thegordian.blogspot.com
http://twitter.com/eikestepper



Am 18.03.2010 18:36, schrieb Rencana Tarigan:
> Hi all, I have problem when try to store a text more than 255 because
> type at H2Database is Varchar and at the model i use EString.
>
> i get this error message :
> [ERROR] org.h2.jdbc.JdbcSQLException: Wert zu gross / lang für Feld
> CONTENT VARCHAR(32672):
> STRINGDECODE('\r\n==========================================
> ========================\r\n\r\nPayPal\r\n\r\n==============
> ========... (166933)
> 3 Value too long for column CONTENT VARCHAR(32672):
> STRINGDECODE('\r\n==========================================
> ========================\r\n\r\nPayPal\r\n\r\n==============
> ========... (166933); SQL statement:
>
> anyone can give me some suggestion to solve this problem ?
> what should i use for data type at the model
>
> Thanks,
>
> CanA
Re: [CDO] Type for text more than 255 [message #521867 is a reply to message #521778] Thu, 18 March 2010 23:12 Go to previous messageGo to next message
Eclipse UserFriend
Ed : already change it, thanks Smile
Eike : hope stefan can give some suggestion Smile
Re: [CDO] Type for text more than 255 [message #521919 is a reply to message #521867] Fri, 19 March 2010 01:10 Go to previous message
Eclipse UserFriend
Rencana,

you can add an EAnnotation to your feature which instructs the DBStore
to use a CLOB instead of a varchar.
There's also an EAnnotation which can be used to adjust the length of
the field, maybe that is already sufficient.

In any case, see org.eclipse.net4j.db.DBAnnotation for the available
annotations.

Cheers,
Stefan



Am 19.03.2010 04:12, schrieb Rencana Tarigan:
> Ed : already change it, thanks :)
> Eike : hope stefan can give some suggestion :)
Previous Topic:xyzPackageImpl.init() race condition
Next Topic:[EMF Plugin] Creating a model depending an other model
Goto Forum:
  


Current Time: Sat Jul 05 12:10:07 EDT 2025

Powered by FUDForum. Page generated in 0.14080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top