db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <to...@first.fhg.de>
Subject Re: Please test the new commons-sql dbhandling
Date Thu, 05 Aug 2004 10:05:16 GMT
Armin Waibel wrote:

> Thomas Dudziak wrote:
>
>> Armin Waibel wrote:
>>
>>> Here a comparision between the valid torque commands and dbhandling:
>>>
>>> Torque:
>>> -------------------------------------
>>> drop table NESTED_FIELDS_ENTRY cascade ;
>>>
>>> CREATE TABLE NESTED_FIELDS_ENTRY
>>> (
>>>     OBJ_ID INTEGER NOT NULL,
>>>     FK_ID DECIMAL (15,0) NOT NULL,
>>>     NAME VARCHAR (150)
>>> );
>>>
>>> ALTER TABLE NESTED_FIELDS_ENTRY
>>>     ADD PRIMARY KEY (OBJ_ID) ;
>>> -------------------------------------
>>>
>>> dbhandling:
>>> -------------------------------------
>>>  CREATE TABLE NESTED_FIELDS_ENTRY
>>>  (
>>>      OBJ_ID INTEGER NOT NULL,
>>>      FK_ID DECIMAL (15,0) NOT NULL,
>>>      NAME VARCHAR (150) UNICODE,
>>>      PRIMARY KEY (OBJ_ID)
>>>  ) failed <com.sap.dbtech.jdbc.exceptions.DatabaseException: [-7006] 
>>> (at
>>> 222): Reserved identifier not allowed:INTEGER>com.sap.dbtech.jdbc
>>> DatabaseException: [-7006] (at 222): Reserved identifier not
>>> allowed:INTEGER
>>>     at
>>> com.sap.dbtech.jdbc.packet.ReplyPacket.createException(ReplyPacket.java:71) 
>>>
>>> ....
>>>
>>> Think the problem is the 'UNICODE' setting in all VARCHAR columns.
>>> If I do
>>>
>>> CREATE TABLE NESTED_FIELDS_ENTRY
>>>  (
>>>      OBJ_ID INTEGER NOT NULL,
>>>      FK_ID DECIMAL (15,0) NOT NULL,
>>>      NAME VARCHAR (150),
>>>      PRIMARY KEY (OBJ_ID)
>>>  )
>>>
>>> the table will be created.
>>
>>
>>
>> Interesting. The MaxDB spec says that this way of specifying a 
>> VARCHAR column is valid:
>>
>> http://dev.mysql.com/doc/maxdb/en/d0/763898d21c11d2a97400a0c9449261/content.htm 
>>
>>
>
> oh! I test the following
>
> CREATE TABLE NESTED_FIELDS_ENTRY
>  (
>      OBJ_ID INTEGER NOT NULL,
>      FK_ID DECIMAL (15,0) NOT NULL,
>      NAME VARCHAR (150) ASCII,
>      PRIMARY KEY (OBJ_ID)
>  )
>
> This command pass too - really funny. I don't know why.

I know now ;-) It seems you have to create the database specifically as 
a UNICODE db:

http://dev.mysql.com/doc/maxdb/en/13/7e05c2acfead44ade8183219051298/content.htm

So I probably have to change the task to allow specifying 
database-specific properties in the create/alter subtasks, in this case 
whether the MaxDB is UNICODE.

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message