Thank you, I appreciate your response. I am not able to locate a file
named 'derby.properties' in my derby database directory. There is a
file named 'service.properties' in this directory. But when I view the
file using a text editor, there is a warning message at the top that
states "Please do NOT edit this file. CHANGING THE CONTENT OF THIS FILE
MAY CAUSE DATA CORRUPTION" -- which of course makes me apprehensive
about making any modifications to it.
It appears that the problem I was having (which I've tested and
verified already) Is that I was making the assumption that when you
specify the ID column as being the Primary Key, .. that it would
automagically be set to auto-incrementing, -- which it is
apparently NOT. In my insert statement, I was not entering an expected
value for the ID column, ... which was causing the error.
So I guess the obvious question is, .. how do I specify an
auto-incrementing primary key using DBEdit? Is this even possible?
Also, is there any way to edit an already created table structure using
DBedit (ie: change data types / properties of columns)? If so, how?
Thanks!
- yvan
myrna wrote:
Yvan
Gagnon wrote:
Hmm, ... that seemed like a logical thing for
me to re-examine, but I've verified that all of the columns in my table
allow for null values. I even dropped and then re-created the table to
make sure. But I 'm still getting the same error message when trying
to insert data.
I'm wondering if perhaps the SQL client / table editor I'm using might
have some shortcomings that are hindering my ability to create tables
with the correct properties (I'm using the DBEdit plugin for Eclipse on
the PC platform). Is there a better client / table editor that you
could recommend, perhaps? -- One that will work with Derby?
Thanks,
- yvan
Well, it was worth a check...
I think I've heard of people using DBEdit and can't remember any
complaints...which may just mean I haven't heard/remembered :-)
But there's always ij - the derby command line SQL utility.
java -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij
(there's some scripts too, but they're not currently in jar files).
IBM developerworks has a plug-in that loads ij into Eclipse:
http://www-106.ibm.com/developerworks/db2/library/techarticle/dm-0501cline/
There's also debugging steps you can take:
- add the following to the startup command for the network server:
-DretrieveMessagesFromServerOnGetMessage=true
(that will show the actual message, rather then just the SQL
ErrorCode).
- add the following to your derby.properties file (unless you have one
already, this should go in the location where your derby database sits)
derby.infolog.append=true
derby.language.logStatementText=true
derby.stream.error.logSeverityLevel=0
Then, you can look in the derby.log file to find out what statement
derby is executing when you encounter the error.
Myrna
|
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.298 / Virus Database: 266.8.4 - Release Date: 3/27/2005