File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Inserting Value in Database

 
Fred Victa
Ranch Hand
Posts: 178
1
  • 0
  • 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#)
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic