Created date value from purchaseOrder table of transaction db looks different in business user application +urgent
- Hi,
Whenever the order is saved in purchase order table value for created column is set. When i search for this order in customer and order manager (Business user application) I see the data for created column is different. The diffence is of 4hrs. Is it something to deal with timezone on which server or services are?
When we insert data in purchase order table which value for created column pipeline method takes while executing? Is it SQl server getdate() or system date in which website is hosted or commerce server is hosted?
Thanks for the help in advance.
Manjushree
Answers
I am assuming the value is set from commerce server. Here are the reasons for this.
* SPI_Ord_PurchaseOrder stored procedure which inserts data in PurchaseOrder table is expecting created date as input parameters and there is no default value set for the column in the table.
* If you observe basket class - Created and LastModified properties are get properties (not set) - that means commerce server is taking control on these dates while inserting values in to database.Hope this helps.
Regards,
-Ravi Kanth Koppala
http://techblog.ravikanth.net (If this post answers your question - Either Mark this post as the answer or vote as being useful.)- Proposed As Answer byRavi Kanth KoppalaMVPFriday, October 30, 2009 9:52 AM
- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM
Hi,
If you have a look at: http://msdn.microsoft.com/en-us/library/microsoft.commerceserver.runtime.orders.ordergroup.created.aspx
OrderGroup.Created: A DateTime containing the local time when the order group was created.
Created is set during the initial construction of the current order object. It is not updated during storage loads.When Created or other DateTime fields are stored or loaded back from the computer that is running SQL Server, the resolution has to be lower than that with TickCount.
http://gaelduhamel.spaces.live.com; http://www.twitter.com/GaelDuhamel; http://www.itcreme.com- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM
The TickCount (http://msdn.microsoft.com/en-us/library/system.environment.tickcount(VS.80).aspx) is often used for time measurement. So here, it means that the Created date has to be lower than the other datetime fields and for calculate it, the API use the tickcount.
http://gaelduhamel.spaces.live.com; http://www.twitter.com/GaelDuhamel; http://www.itcreme.com- Proposed As Answer byGael DuhamelMVPMonday, November 02, 2009 8:42 PM
- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM
All Replies
I am assuming the value is set from commerce server. Here are the reasons for this.
* SPI_Ord_PurchaseOrder stored procedure which inserts data in PurchaseOrder table is expecting created date as input parameters and there is no default value set for the column in the table.
* If you observe basket class - Created and LastModified properties are get properties (not set) - that means commerce server is taking control on these dates while inserting values in to database.Hope this helps.
Regards,
-Ravi Kanth Koppala
http://techblog.ravikanth.net (If this post answers your question - Either Mark this post as the answer or vote as being useful.)- Proposed As Answer byRavi Kanth KoppalaMVPFriday, October 30, 2009 9:52 AM
- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM
Hi,
If you have a look at: http://msdn.microsoft.com/en-us/library/microsoft.commerceserver.runtime.orders.ordergroup.created.aspx
OrderGroup.Created: A DateTime containing the local time when the order group was created.
Created is set during the initial construction of the current order object. It is not updated during storage loads.When Created or other DateTime fields are stored or loaded back from the computer that is running SQL Server, the resolution has to be lower than that with TickCount.
http://gaelduhamel.spaces.live.com; http://www.twitter.com/GaelDuhamel; http://www.itcreme.com- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM
- Hi,
Thanks for the replies. I did not understand what do you mean by the resolution has to be lower than that with TickCount.?
Will you please explain it?
Thanks,
Manjushree The TickCount (http://msdn.microsoft.com/en-us/library/system.environment.tickcount(VS.80).aspx) is often used for time measurement. So here, it means that the Created date has to be lower than the other datetime fields and for calculate it, the API use the tickcount.
http://gaelduhamel.spaces.live.com; http://www.twitter.com/GaelDuhamel; http://www.itcreme.com- Proposed As Answer byGael DuhamelMVPMonday, November 02, 2009 8:42 PM
- Marked As Answer byManjushree Sunday, November 15, 2009 7:05 AM

