Skip to main content
Solved

Error in Tstamp Field When saving records

  • June 13, 2023
  • 13 replies
  • 311 views
  • Translate All

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

13 replies

Forum|alt.badge.img+8
  • Captain II
  • June 13, 2023

I’d try removing the PXUIField attribute. 

Translate

Forum|alt.badge.img+1

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

Translate

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

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.

Translate

Forum|alt.badge.img+1

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

Translate

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

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

Translate

Forum|alt.badge.img+1

@darylbowman I will try it. Thanks!
 

Translate

Forum|alt.badge.img+1

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

Translate

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

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.

Translate

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?

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

@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?

Translate

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.

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

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

Translate

Forum|alt.badge.img+1

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

Thanks All..!

Translate