Skip to main content
Solved

Error in Tstamp Field When saving records


Forum|alt.badge.img+1

Hi all,

I have created a new screen & two new tables. But when I’m saving a record I got this error.  And now I can not access that screen. 

Error

Error: An error occurred during processing of the field Tstamp: Unable to convert MySQL date/time to System.DateTime, set AllowZeroDateTime=True or ConvertZeroDateTime=True in the connection string. See https://mysqlconnector.net/connection-options/.

Here is DAC Tstamp field.

    #region Tstamp
    [PXDBTimestamp()]
    [PXUIField(DisplayName = "Tstamp")]
    public virtual byte[] Tstamp { get; set; }
    public abstract class tstamp : PX.Data.BQL.BqlByteArray.Field<tstamp> { }
    #endregion

 

Anyone know how  to fix this?

Thanks.

Best answer by Naveen Boga

@charithalakshan49  Tstamp field is one of the Audit fields in the Acumatica tables and recommended to have it in the tables.

After adding the  ConvertZeroDateTime=True in the web.config → Connection String, is that issue resolved?

View original
Did this topic help you find an answer to your question?

13 replies

Forum|alt.badge.img+6
  • Captain II
  • 556 replies
  • June 13, 2023

I’d try removing the PXUIField attribute. 


Forum|alt.badge.img+1

@Django I tried that. But still the same error.


darylbowman
Captain II
Forum|alt.badge.img+13

According to the most popular answer to this question, it seems like the solution is present in the error.

 

If that is indeed the case, hats off to the error handler. I find actually useful, human-readable error codes to be the exception and not the rule.


Forum|alt.badge.img+1

@darylbowman So I need to do that in Mysql Server? How can I do that?


darylbowman
Captain II
Forum|alt.badge.img+13

The connection string would be found in the web.config file at the root of your Acumatica site.


Forum|alt.badge.img+1

@darylbowman I will try it. Thanks!
 


Forum|alt.badge.img+1

@darylbowman What happen if I remove Tstamp field? Will it leads to errors in the future?


darylbowman
Captain II
Forum|alt.badge.img+13

Since I’m not really familiar with MySQL, I can’t say for sure. I don’t think it’s a required field, but it sounds like the underlying issue would have something to do with datetime fields, which could potentially crop back up later.


Forum|alt.badge.img+1

@darylbowman Ok.Thanks for the idea.

@Django  Do you have any idea of this? What happen if I remove Tstamp field? Will it leads to errors in the future?


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3404 replies
  • Answer
  • June 13, 2023

@charithalakshan49  Tstamp field is one of the Audit fields in the Acumatica tables and recommended to have it in the tables.

After adding the  ConvertZeroDateTime=True in the web.config → Connection String, is that issue resolved?


Forum|alt.badge.img+1

@Naveen Boga Thanks. I still do not have access permissions to do that. I will try it and will update the result  here.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3404 replies
  • June 13, 2023

Sure @charithalakshan49  After adding the above attribute in the web.config, assuming that issue will be resolved.


Forum|alt.badge.img+1

After adding the above attribute in the web.config file the issue was resolved.

Thanks All..!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings