wood burning stoves 2.0*
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
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: 86
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#)
 
Don't get me started about those stupid light bulbs.
 
subject: Problem with Inserting Value in Database
 
Similar Threads
pageContext in EL
How to pass Java Objects into Stored Procedure in DB2
jsp and mysql error
JPA: Secondary tables +optimistic locking
Not able to read the value of a component on one JPanel from a different JPanel