You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "G.Venkata Phanindra" <ph...@gmail.com> on 2006/10/04 07:28:51 UTC
Problem with storing data into Data base
Hi,
I am trying to add an entry into one of the table Named OrderHeaderExt
i am writting the following lines of code but the data is not getting stored
into data base.what is that iam doing worng in the following lines of code.
------------------------------------------------------
String deliveryDate = "22/Sep/2006";
Date deliveryDateValue = df.parse(deliveryDate);
Timestamp deliveryDateTimestamp = new Timestamp(
deliveryDateValue.getTime());
GenericValue orderHeaderExt = delegator.makeValue("OrderHeaderExt",
UtilMisc.toMap("orderId", orderId, "deliveryDate", deliveryDateTimestamp));
try {
orderHeaderExt.store();
} catch (GenericEntityException e) {
e.printStackTrace();
}
--
G.Venkata Phanindra
Mob:: 9849852989
Re: Problem with storing data into Data base
Posted by Chris Howe <cj...@yahoo.com>.
orderId is undefined. If you've defined it elsewhere,
the error should be printed in the log.
--- "G.Venkata Phanindra" <ph...@gmail.com> wrote:
> Hi,
> I am trying to add an entry into one of the
> table Named OrderHeaderExt
> i am writting the following lines of code but the
> data is not getting stored
> into data base.what is that iam doing worng in the
> following lines of code.
>
------------------------------------------------------
> String deliveryDate = "22/Sep/2006";
> Date deliveryDateValue =
> df.parse(deliveryDate);
> Timestamp deliveryDateTimestamp = new
> Timestamp(
> deliveryDateValue.getTime());
> GenericValue orderHeaderExt =
> delegator.makeValue("OrderHeaderExt",
> UtilMisc.toMap("orderId", orderId, "deliveryDate",
> deliveryDateTimestamp));
> try {
> orderHeaderExt.store();
> } catch (GenericEntityException e) {
> e.printStackTrace();
> }
>
> --
> G.Venkata Phanindra
> Mob:: 9849852989
>