RE: Inserting Special Characters in Oracle using TORQUE.

2007-10-28 Thread SheraX

Alright, I understand now. Thanks alot for the help.. I need to look for the
solution with least impact on the application.

Regards

Sheraz Jamshed



Thomas Fischer-11 wrote:
> 
> SheraX <[EMAIL PROTECTED]> schrieb am 26.10.2007 12:30:15:
> 
>>
>> Thanks alot for the reply Thomas.
>>
>> Regarding your solution a) how can I check the length for the character
> set
>> that Tourque Uses?
> 
> You misunderstood me. Not Torque uses a characterset, but the database
> does. Check Your database manual for how to find out the characterset of
> your database (usually this is configurable)
> 
>> For solution b) how can I change the db character set?
> 
> Again, this needs to be changed in the database. Check the db manual.
> 
>> Can we change the charset of db from any torque configuration files ?
> 
> Definitely not.
> 
>>
>> Thanks in advance...
>>
>> Sheraz Jamshed
>>
>>
>>
>>
>> Thomas Fischer-11 wrote:
>> >
>> > There are fixed length character sets (each character uses the same
> amount
>> > of space, like ISO-8859-1 (1 byte) or unicode(2 bytes)) and variable
>> > length
>> > character sets where some characters neen more space than others (e.g.
>> > utf-8 where characters can occupy 1-3 bytes). It seems that java and
> the
>> > db
>> > use different character sets. The database or its driver takes care of
> the
>> > conversion, which can lead to a longer byte sequence in the db.
>> >
>> > The solution would be a) to make the length check in the charset of the
> db
>> > or b) use the same charset in the db as in the web application.
>> >
>> >   Thomas
>> >
>> > SheraX <[EMAIL PROTECTED]> schrieb am 26.10.2007 08:21:17:
>> >
>> >>
>> >> Hellow everyone,
>> >>
>> >> I am getting a strange problem. I am developing a webapplication in
> IBM
>> >> Rational Software Development Platform Version: 6.0.1 Using Torque
>> > Version
>> >> 3.0.2.
>> >> I need to insert special characters like (ABCDEFG1234ÑãäåæçèéêêהЦБЌ)
> into
>> > an
>> >> Oracle(10g) Table Column of type VARCHAR2(4000 BYTE).
>> >>
>> >> The Charset of web application is default IS0-8859. The value is saved
> in
>> >> database and retrieved and displayed fine. But the problem arises on
>> > boundry
>> >> value checks.
>> >> Now the string containing special characters of higher decimal ASCII
>> > value
>> >> occupy more bytes then lower ASCII value. So the length of the string
> is
>> >> different then the number of characters input by user.
>> >> Before inserting into database I validate the input value in the form
> to
>> > be
>> >> less then 4000 bytes (using myValue.length() ). It indeed shows value
>> > less
>> >> then 4000 like in one case the length of the string is 3680. But when
>> > torque
>> >> tries to insert the value in database the ORA Exception is encountered
>> >>
>> >> "org.apache.torque.TorqueException: Data size bigger than max size for
>> > this
>> >> type: 4245"
>> >>
>> >>
>> >> I am not able to understand why string length changes when torque
> tries
>> > to
>> >> insert it into the database.
>> >>
>> >> Awaiting Response
>> >>
>> >>
>> >> Regards
>> >>
>> >> SheraX
>> >>
>> >>
>> >> --
>> >> View this message in context: http://www.nabble.com/Inserting-Special-
>> >> Characters-in-Oracle-using-TORQUE.-tf4695403.html#a13421479
>> >> Sent from the Apache DB - Torque Dev mailing list archive at
> Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >
>>
>> --
>> View this message in context: http://www.nabble.com/Inserting-Special-
>> Characters-in-Oracle-using-TORQUE.-tf4695403.html#a13424494
>> Sent from the Apache DB - Torque Dev mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> 

-- 
View this message in context: 
http://www.nabble.com/Inserting-Special-Characters-in-Oracle-using-TORQUE.-tf4695403.html#a13462077
Sent from the Apache DB - Torque Dev mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RESULT] [VOTE] Accept Village code contribution from Jon Stevens

2007-10-28 Thread Scott Eade

Thomas Vandahl wrote:

Thanks, Scott, for managing this. Please let me know when I can start to
integrate the stuff.
As with most things this has been a group effort - thanks also go to 
Jon, Henning and Jean.  And let's not forget the person that is 
integrating the code - i.e. thanks to you Thomas.


The last message to [EMAIL PROTECTED] that mentions "72 hours" was the 
final "go ahead", so integration of the code can commence now.


Please be sure to update the licenses before committing the files and 
make sure Jon appears in the author tags.


Cheers,

Scott

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [RESULT] [VOTE] Accept Village code contribution from Jon Stevens

2007-10-28 Thread Thomas Vandahl
Scott Eade wrote:
> The Torque community has voted to accept the Village code contribution
> from Jon Stevens.
> 
> I will follow up with Jean any remaining steps to finalize this process.

Thanks, Scott, for managing this. Please let me know when I can start to
integrate the stuff.

Bye, Thomas.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (TORQUE-106) Use "boolean" sql type not "bit" sql type with MySQL

2007-10-28 Thread Thomas Vandahl (JIRA)

[ 
https://issues.apache.org/jira/browse/TORQUE-106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12538325
 ] 

Thomas Vandahl commented on TORQUE-106:
---

I remember a problem with bit columns in the runtime test of Torque against 
MYSQL-5 which could be solved by using a new MYSQL JDBC driver, version 5.0 or 
higher. Could you please check if that applies to your case, too?

> Use "boolean" sql type not "bit" sql type with MySQL
> 
>
> Key: TORQUE-106
> URL: https://issues.apache.org/jira/browse/TORQUE-106
> Project: Torque
>  Issue Type: Bug
>Affects Versions: 3.2
>Reporter: Will Glass-Husain
> Attachments: mysqlpatch.patch
>
>
> In MySQL 5.0.3 the meaning of the BIT data type changed.  It used to be 
> equivalent to tinyint(1) but now it is a new bitwise datatype.  This means 
> that when Torque generates SQL files with a "bit" data type (mapped to the 
> Java boolean) it is incorrect.
> I suggest that Torque map the Torque "bit" type to the MySQL "Boolean" type 
> instead when generating SQL.  See the reference from the MySQL manual below.
> http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
> * BIT[(M)]
>   A bit-field type. M indicates the number of bits per value, from 1 to 
> 64. The default is 1 if M is omitted.
>   This data type was added in MySQL 5.0.3 for MyISAM, and extended in 
> 5.0.5 to MEMORY, InnoDB, and BDB. Before 5.0.3, BIT is a synonym for 
> TINYINT(1).
> 
> *  TINYINT[(M)] [UNSIGNED] [ZEROFILL]
>   A very small integer. The signed range is -128 to 127. The unsigned 
> range is 0 to 255.
>
> * BOOL, BOOLEAN
>   These types are synonyms for TINYINT(1). A value of zero is considered 
> false. Non-zero values are considered true: 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]