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 Wed, 30 Mar 2005 12:15:50 GMT
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? 

 - yvan

myrna wrote:

> That error message is "23502=Column ''{0}''  cannot accept a NULL value."
> So, could there be another column in this table? One that has been 
> created as not-null?
> Myrna

Yvan Gagnon wrote:

I'm running BlueDragon (Cold Fusion) server on the PC Platform, and have 
a Derby database set up as a datasource which I am able to query without 
any problems (using cold fusion).  However, whenever I try to insert 
data into the database I get the following error message:

Query Error     DB2 SQL error: SQLCODE: -1, SQLSTATE: 23502, SQLERRMC:
Native Error Code       -1
SQL State       23502

My SQL statement for doing the insert is very simple:

<cfquery datasource="MyDSN">
   INSERT INTO MyDatabase.test (mytext)
   VALUES ('this is my text')

I don't believe that I need to include a username and password in the 
cfquery tag, as I am able to query the database without needing to 
include that information.  And besides, I have of course already tried 
it with the username and password, but got the same error message.  So 
why would this insert statement be failing?  Does the error message I've 
indicated above reveal anything significant?

- yvan

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

View raw message