db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yvan Gagnon <y...@atzilut.com>
Subject Re: Can't insert into Derby database via Cold Fusion?
Date Thu, 31 Mar 2005 13:19:40 GMT
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?

- 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

View raw message