Error While inserting data in database

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error While inserting data in database

dhiraj.g
nquiry
Bill Of Materials

Hi
 When  this type of error come.

The Following Errors Occurred:

ERROR: Could not complete the Create New Enquiry [file:/home/pks/Desktop/Dhiraj%20Docs/workspace3/apache-ofbiz-10.04/applications/enquiry/script/org/ofbiz/enquiry/EnquiryServices.xml#createEnquiry] process [problem creating the newEntity value: Error while inserting: [GenericEntity:Enquiry][createdStamp,2011-12-09 02:01:28.18(java.sql.Timestamp)][createdTxStamp,2011-12-09 02:01:27.672(java.sql.Timestamp)][lastUpdatedStamp,2011-12-09 02:01:28.18(java.sql.Timestamp)][lastUpdatedTxStamp,2011-12-09 02:01:27.672(java.sql.Timestamp)] (SQL Exception while executing the following:INSERT INTO OFBIZ.ENQUIRY (SALUTATION, FIRST_NAME, LAST_NAME, PRODUCT_DESCRIPTION, ADDRESS1, ADDRESS2, CITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Column 'ENQUIRY_ID' cannot accept a NULL value.))]
Dhiraj Gupta
Reply | Threaded
Open this post in threaded view
|

Re: Error While inserting data in database

Paul Foxworthy
Hi Dhiraj,

You need to set an enquiry ID before you save it into the database. If you don't have your own rules for ID values, you could use the sequence numbers provided by OFBiz. An example of a create service that uses a sequence is at https://fisheye6.atlassian.com/browse/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/agreement/AgreementServices.xml?hb=true#to29

Cheers

Paul Foxworthy

dhiraj.g wrote
nquiry
Bill Of Materials

Hi
 When  this type of error come.

The Following Errors Occurred:

ERROR: Could not complete the Create New Enquiry [file:/home/pks/Desktop/Dhiraj%20Docs/workspace3/apache-ofbiz-10.04/applications/enquiry/script/org/ofbiz/enquiry/EnquiryServices.xml#createEnquiry] process [problem creating the newEntity value: Error while inserting: [GenericEntity:Enquiry][createdStamp,2011-12-09 02:01:28.18(java.sql.Timestamp)][createdTxStamp,2011-12-09 02:01:27.672(java.sql.Timestamp)][lastUpdatedStamp,2011-12-09 02:01:28.18(java.sql.Timestamp)][lastUpdatedTxStamp,2011-12-09 02:01:27.672(java.sql.Timestamp)] (SQL Exception while executing the following:INSERT INTO OFBIZ.ENQUIRY (SALUTATION, FIRST_NAME, LAST_NAME, PRODUCT_DESCRIPTION, ADDRESS1, ADDRESS2, CITY, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP, CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) (Column 'ENQUIRY_ID' cannot accept a NULL value.))]
--
Coherent Software Australia Pty Ltd
http://www.coherentsoftware.com.au/

Bonsai ERP, the all-inclusive ERP system
http://www.bonsaierp.com.au/