jQuery in Action, 2nd edition*
The moose likes Object Relational Mapping and the fly likes Problem with Inserting Value in Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Problem with Inserting Value in Database" Watch "Problem with Inserting Value in Database" New topic
Author

Problem with Inserting Value in Database

Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 90
I'm trying to insert some data into a database with the following piece of code. When the street address is null, I get an error message saying that the system could not get the property 'streetAddress'. It looks like it is not allowing me to insert a null value into the database. If the street address is null, how can I insert a null value into the database.

<insert id="insertMyFile"
parameterClass="com.test.MyClass">
insert into MYTABLE (COLUMN1, COLUMN2, COLUMN3, COLUMN4) values
(#firstName:CHAR#, #lastName:CHAR#, #streetAddress:CHAR#, #emailAddress:CHAR#)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with Inserting Value in Database