Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Type for text more than 255
[CDO] Type for text more than 255 [message #521778] Thu, 18 March 2010 17:36 Go to next message
Rencana Tarigan is currently offline Rencana TariganFriend
Messages: 56
Registered: July 2009
Location: Bandung, Indonesia
Member

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: Fri, 19 March 2010 03:10]

Report message to a moderator

Re: Type for text more than 255 [message #521792 is a reply to message #521778] Thu, 18 March 2010 13:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Type for text more than 255 [message #521833 is a reply to message #521778] Thu, 18 March 2010 20:32 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
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] Fri, 19 March 2010 03:12 Go to previous messageGo to next message
Rencana Tarigan is currently offline Rencana TariganFriend
Messages: 56
Registered: July 2009
Location: Bandung, Indonesia
Member

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 05:10 Go to previous message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
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: Fri Apr 19 11:28:05 GMT 2024

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

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

Back to the top