• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with Inserting Value in Database

 
Fred Victa
Ranch Hand
Posts: 192
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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#)
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!