db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrna <my...@Golux.Com>
Subject Re: Can't insert into Derby database via Cold Fusion?
Date Wed, 30 Mar 2005 00:36:23 GMT
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:
> ID23502
> 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')
> </cfquery>
> 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?
> thanks,
> - yvan
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?


View raw message