• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Strange behavior of Derby database. SQL generation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Strange behavior of Derby database. SQL generation


  • Subject: Strange behavior of Derby database. SQL generation
  • From: Sergio Sánchez Maffet <email@hidden>
  • Date: Tue, 5 Feb 2008 19:15:51 +0100

Hi all,

I'm trying to get the derby database up and running with a new WO application (a simple test). Trying to insert some simple records including a 24 byte auto generated primary key, I encountered a strange problem related to the SQL.

In contrast to the description in the derby documentation provided with the JavaWebObjects examples, derby expects all external names surrounded by double quotes. (I have done a dirty trick putting double quotes into the external name in the model file itself, only to test my guess and it does work)

Here is an example:
The following code will only run when you replace (created, start, name, stop, id_r) with ("created", "start", "name", "stop", "id_r")


INSERT INTO tablea(created, start, name, stop, id_r) VALUES (?, NULL, ?, NULL, ?)" withBindings: 1:2008-02-05 18:35:43(created), 2:"Test"(name), 3:<NSData: length=24, data=0... deleted...000>(idR)>:

Error:
Next exception:SQL State:42X14 -- error code: 20000 -- msg: 'CREATED' is not a column in table or VTI 'APP.TABLEA'.


But the table and the column exists! Checked with ij tool (show tables and describe tablea).

There are three possibilities left:

1. Force the SQLExpression to use quotes on external names, but this is deprecated, and a simple test did not work. (should I try harder? ;-))
2. Repair, patch, configuration or what else to let derby accept unquoted external names as described in the doc.


Other ideas?

My setup:
derby.system.home=/Library/Databases/Derby
derby.ui.codeset=UTF8

WO 5.4
Derby 10.2.2.0 (jars copied from the examples installation)
WOLips 4788

Any clues?
--
Sergio
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Strange behavior of Derby database. SQL generation
      • From: David Avendasora <email@hidden>
  • Prev by Date: Re: Stored procedures and prototypes problem
  • Next by Date: Re: Stored procedures and prototypes problem
  • Previous by thread: Re: Stored procedures and prototypes problem
  • Next by thread: Re: Strange behavior of Derby database. SQL generation
  • Index(es):
    • Date
    • Thread