You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Jitendra Kharche <Ji...@geometricsoftware.com> on 2006/07/24 13:51:45 UTC

Java Data Types in Derby

 
Thanks Kristian.
I checked. The column size is smaller than the data being inserted.

I have two questions
1. Does Derby support java data types like cloudscape?
2. Is there any user interface tool for Derby?
 
Regards,
Jitendra Kharche
Geometric Software Solutions Co. Ltd.
Work: +91-20-2290 6351
 
********************************************************************
This e-mail communication and any attachments are privileged and
confidential and intended only for the use of the recipients named
above. If you are not the intended recipient, please do not review,
disclose, disseminate, distribute or copy this e-mail and attachments.
If you have received this communication in error, please notify the
sender immediately by email or telephone at+91-20-22906351.
*********************************************************************

-----Original Message-----
From: Kristian.Waagan@Sun.COM [mailto:Kristian.Waagan@Sun.COM] 
Sent: Monday, July 24, 2006 4:56 PM
To: Derby Discussion
Subject: Re: ERROR 22001

Jitendra Kharche wrote:
> Hi,
>  
> I am using Derby that is embedded in Websphere App Server Community
Edition.
> I get the following error
> ERROR 22001: A truncation error was encountered trying to shrink 
> VARCHAR Can anybody explain about this and how can i remove it.

Hello Jitendra,

To me it looks like the data that is inserted into Derby is too large
(ie. the string is too long). The maximum size of VARCHAR in Derby is
32672 characters. It might also be that the column is defined to have a
smaller maximum length.

As for truncation, only trailing whitespace can be truncated.

You could check the length of your data and the maximum length of the
column it is inserted into.
If the data is too long, you can increase the size of your VARCHAR
column.
If you need to store larger amounts of texts, you might have to use CLOB
instead.

You also have LONG VARCHAR. It is the same as VARCHAR, but you don't
need to specify a maximum length when you create the table. It can hold
  a maximum of 32700 characters.




Regards,
--
Kristian

>  
> Regards,
> Jitendra


Re: Java Data Types in Derby

Posted by Stephen Caine <st...@commongrnd.com>.
Jitendra,

> 2. Is there any user interface tool for Derby?

We are working on a web based manager for Derby.  Derby and the  
manager will be part of our Qilan v3.8 release.  This release is due  
out by 8/1/06, but you can download v3.7 now.

http://www.qilan.com
http://cgs.qilan.com:8080/qilan/Qilanv3Download

I would be happy to answer any questions you have.

Stephen Caine
CommonGround Softworks, Inc.

Re: Java Data Types in Derby

Posted by John Embretsen <Jo...@Sun.COM>.
Jitendra Kharche wrote:

> 2. Is there any user interface tool for Derby?

ij is a (non-graphical) tool that is distributed with Derby. You can use
its command line interface to run SQL scripts or execute commands.

If you are looking for graphical UIs there are a number of different
variants out there that support Derby. See for example:

"Using SQuirreL SQL Client with Derby":
http://db.apache.org/derby/integrate/SQuirreL_Derby.html

"NetBeans Derby Tutorial":
http://www.netbeans.org/kb/50/derby-demo.html


-- 
John



Re: Java Data Types in Derby

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Jitendra,

Jitendra Kharche wrote:

> 
>Thanks Kristian.
>I checked. The column size is smaller than the data being inserted.
>
>I have two questions
>1. Does Derby support java data types like cloudscape?
>  
>
I think you may be asking whether Derby, like Cloudscape, supports 
abstract data types, that is, the ability to declare a column's type to 
be any Serializable java class. This functionality was removed from 
Derby before it was open-sourced. The reason was that the language 
supporting this feature was not the ANSI approved language for declaring 
ADTs. Fortunately, most of the machinery needed to support this feature 
is still in the codeline and what we need to do is bolt the standard 
ANSI language on top. This enhancement is logged as DERBY-651.

Regard,
-Rick

>2. Is there any user interface tool for Derby?
> 
>Regards,
>Jitendra Kharche
>Geometric Software Solutions Co. Ltd.
>Work: +91-20-2290 6351
> 
>********************************************************************
>This e-mail communication and any attachments are privileged and
>confidential and intended only for the use of the recipients named
>above. If you are not the intended recipient, please do not review,
>disclose, disseminate, distribute or copy this e-mail and attachments.
>If you have received this communication in error, please notify the
>sender immediately by email or telephone at+91-20-22906351.
>*********************************************************************
>
>-----Original Message-----
>From: Kristian.Waagan@Sun.COM [mailto:Kristian.Waagan@Sun.COM] 
>Sent: Monday, July 24, 2006 4:56 PM
>To: Derby Discussion
>Subject: Re: ERROR 22001
>
>Jitendra Kharche wrote:
>  
>
>>Hi,
>> 
>>I am using Derby that is embedded in Websphere App Server Community
>>    
>>
>Edition.
>  
>
>>I get the following error
>>ERROR 22001: A truncation error was encountered trying to shrink 
>>VARCHAR Can anybody explain about this and how can i remove it.
>>    
>>
>
>Hello Jitendra,
>
>To me it looks like the data that is inserted into Derby is too large
>(ie. the string is too long). The maximum size of VARCHAR in Derby is
>32672 characters. It might also be that the column is defined to have a
>smaller maximum length.
>
>As for truncation, only trailing whitespace can be truncated.
>
>You could check the length of your data and the maximum length of the
>column it is inserted into.
>If the data is too long, you can increase the size of your VARCHAR
>column.
>If you need to store larger amounts of texts, you might have to use CLOB
>instead.
>
>You also have LONG VARCHAR. It is the same as VARCHAR, but you don't
>need to specify a maximum length when you create the table. It can hold
>  a maximum of 32700 characters.
>
>
>
>
>Regards,
>--
>Kristian
>
>  
>
>> 
>>Regards,
>>Jitendra
>>    
>>
>
>  
>


RE: Java Data Types in Derby

Posted by de...@segel.com.

> -----Original Message-----
> From: Jitendra Kharche [mailto:Jitendra.Kharche@geometricsoftware.com]
> Sent: Monday, July 24, 2006 6:52 AM
> To: Derby Discussion
> Subject: Java Data Types in Derby
> 
> 
> Thanks Kristian.
> I checked. The column size is smaller than the data being inserted.
> 
> I have two questions
> 1. Does Derby support java data types like cloudscape?
[mjs] 
DERBY IS CLOUDSCAPE.
And JavaDB....

> 2. Is there any user interface tool for Derby?
> 
[mjs] 
User interface? Like Squirrel DB? Built in viewer to Eclipse?
Or did you mean GUI development like NetBeans or Eclipse?

The short answer is yes to both.

> Regards,
> Jitendra Kharche
> Geometric Software Solutions Co. Ltd.
> Work: +91-20-2290 6351
> 
> ********************************************************************
> This e-mail communication and any attachments are privileged and
> confidential and intended only for the use of the recipients named
> above. If you are not the intended recipient, please do not review,
> disclose, disseminate, distribute or copy this e-mail and attachments.
> If you have received this communication in error, please notify the
> sender immediately by email or telephone at+91-20-22906351.
> *********************************************************************
> 
> -----Original Message-----
> From: Kristian.Waagan@Sun.COM [mailto:Kristian.Waagan@Sun.COM]
> Sent: Monday, July 24, 2006 4:56 PM
> To: Derby Discussion
> Subject: Re: ERROR 22001
> 
> Jitendra Kharche wrote:
> > Hi,
> >
> > I am using Derby that is embedded in Websphere App Server Community
> Edition.
> > I get the following error
> > ERROR 22001: A truncation error was encountered trying to shrink
> > VARCHAR Can anybody explain about this and how can i remove it.
> 
> Hello Jitendra,
> 
> To me it looks like the data that is inserted into Derby is too large
> (ie. the string is too long). The maximum size of VARCHAR in Derby is
> 32672 characters. It might also be that the column is defined to have a
> smaller maximum length.
> 
> As for truncation, only trailing whitespace can be truncated.
> 
> You could check the length of your data and the maximum length of the
> column it is inserted into.
> If the data is too long, you can increase the size of your VARCHAR
> column.
> If you need to store larger amounts of texts, you might have to use CLOB
> instead.
> 
> You also have LONG VARCHAR. It is the same as VARCHAR, but you don't
> need to specify a maximum length when you create the table. It can hold
>   a maximum of 32700 characters.
> 
> 
> 
> 
> Regards,
> --
> Kristian
> 
> >
> > Regards,
> > Jitendra