db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Armin Waibel <arm...@apache.org>
Subject Re: Please test the new commons-sql dbhandling
Date Thu, 05 Aug 2004 09:16:16 GMT
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.

regards,
Armin


Armin Waibel wrote:

> Hi Tom,
> 
> I made a first test run with maxDB/sapDB and get thousands of errors on 
> the console. Is the support for maxDB implemented?
> 
> Can you describe me in a few words how dbhandling is working (which 
> files are used to generate the sql-query, ...)
> 
> regards,
> Armin
> 
> 
>  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)
> ....
> ....
> ]     OBJ_ID DECIMAL (15,0) NOT NULL,
> ]     NAME VARCHAR (150) UNICODE,
> ]     NESTED_VALUE VARCHAR (150) UNICODE,
> ]     NESTED_DESCRIPTION VARCHAR (150) UNICODE,
> ]     PRIMARY KEY (OBJ_ID)
> ] ) failed with com.sap.dbtech.jdbc.exceptions.DatabaseException: 
> [-7006] (at 218): Reserved identifier not allowed:DECIMAL
> ] [ERROR] DDLExecutor - Command -- 
> -----------------------------------------------------------------------
> ] -- NESTED_FIELDS_ENTRY
> 
> ...
> 
> [dbhandling] CREATE TABLE CRT_SUB_PROJECT
> [dbhandling] (
> [dbhandling]     SUB_ID INTEGER NOT NULL,
> [dbhandling]     PROJECT_ID INTEGER,
> [dbhandling]     TUTOR_ID INTEGER,
> [dbhandling]     NAME VARCHAR (150) UNICODE,
> [dbhandling]     PRIMARY KEY (SUB_ID)
> [dbhandling] ) failed with 
> com.sap.dbtech.jdbc.exceptions.DatabaseException: [-7006] (at 214): 
> Reserved identifier not allowed:INTEGER
> [dbhandling] [ERROR] DDLExecutor - Command -- 
> -----------------------------------------------------------------------
> [dbhandling] -- OTM_PERSON
> [dbhandling] -- 
> -----------------------------------------------------------------------
> 
> 
> Thomas Dudziak wrote:
> 
>> Hi folks,
>>
>> just checked in the last changes to the commons-sql dbhandling stuff, 
>> and I think it's in a usable state now.
>>
>> Since I have only access to few databases, I wanted to ask you whether 
>> you could test it against the other databases that OJB supports. More 
>> specifically, it would be great if you could test it against these dbs:
>>
>> * db2
>> * postgresql
>> * oracle (8, 9, 10)
>> * sybase
>> * maxdb
>> * microsoft sql server (8, 2000)
>>
>> (sapdb/maxdb is currently not supported by commons-sql, but I'll add 
>> support in the near future).
>> Btw, I had to create an adapted version of the hsqldb profile for the 
>> commons-sql dbhandling task because it is executed in the same folder 
>> that ant is started in (as opposed to Torque that was run in the 
>> target/test folder), so if you want to run the unit tests with 
>> commons-sql dbhandling against hsqldb, please use the adapted profile.
>>
>> All you'd have to do is to invoke the unit tests like this:
>>
>>   ant -Duse-commons-sql=true junit
>>
>> and compare the test results with those of a normal unit test run. If 
>> some new problem occurs, it would be helpful if you could also provide 
>> me with database dumps of the unit test db after for the test runs via 
>> either torque and commons-sql, e.q. after executing
>>
>>   ant prepare-testdb
>>
>> for torque and
>>
>>   ant -Duse-commons-sql=true prepare-testdb
>>
>> for commons-sql, so I can compare the dbs created by Torque and by 
>> commons-sql.
>>
>> Thanks,
>> Tom
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-dev-help@db.apache.org
>>
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
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