1. Marc James
  2. PowerBuilder
  3. Wednesday, 24 July 2024 11:23 AM UTC

Hi,

 

I have a problem with time precision this is the value in the database of a time column

16:29:15.983

Put displays in a datawindow as

16:29:15.000

Now this is not a problem as such because im not that bothered about factions of seconds , the issue is when the user tries to update the datawindow we get a ROW CHANGED BETWEEN RETREIVE AN UPDATE.

Now the workaround is for someone to go into the database and remove the factions and then it works.

But is there a way we can fix the datawindow to show the fractions?

 

I have attached screen show of what is shows in SQL anywhere console and what it shows in datawindow.

 

 

Attachments (2)
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 26 July 2024 16:58 PM UTC
  2. PowerBuilder
  3. # 1

I requested support for datetime2. They have no plans to support it.

https://www.appeon.com/standardsupport/track/view?id=8603

In my testing, the time and datetime variables can handle 6 digits but the Now() function only returns 3.

Comment
There are no comments made yet.
Larry Pettit Accepted Answer Pending Moderation
  1. Friday, 26 July 2024 12:55 PM UTC
  2. PowerBuilder
  3. # 2

https://community.appeon.com/index.php/qna/q-a/pb-support-for-datetime-and-datetime2-in-sql-server

Although the above post refers to MS SQL Server, it sounds like the same issue that you are experiencing in SQL Anywhere.

 

Comment
There are no comments made yet.
Andreas Mykonios Accepted Answer Pending Moderation
  1. Wednesday, 24 July 2024 12:10 PM UTC
  2. PowerBuilder
  3. # 3

Hi.

Have you tried to set time format to "hh:mm:ss.fff"? If not, what do you see when doing so?

Andreas.

Comment
  1. Marc James
  2. Wednesday, 24 July 2024 13:02 PM UTC
yes it is set to use that format is just hows 19:01:00.000 it always shows the last three as 000
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 24 July 2024 11:47 AM UTC
  2. PowerBuilder
  3. # 4

I think it might have to do something with the datetime format in your SQLCA dbparm settings. I'm not an expert in sqlanywhere, but that's where I would start to look at.

Comment
  1. Marc James
  2. Wednesday, 24 July 2024 13:07 PM UTC
The issue I believe is because the datawindow cant show the true value from the database it alaways thinks there is change bewtween retrieve and update.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 24 July 2024 15:50 PM UTC
Hi Marc;

=> "If i go into the datawindow and make these no updateable then its fine."

Exactly, that is what is normally done by most PB developers. :-)

However, there is the issue of PB not supporting the DatTime2 and DateTimeOffset data types (unfortunately). :-(

So PB Apps will need to stay away from using those types of columns.

Instead, updating these with a DBMS Trigger as a workaround.

Regards .. Chris
  1. Helpful 2
  1. Marc James
  2. Friday, 26 July 2024 13:27 PM UTC
I have fixed the issue for myself it was the updatable properties of the datawindow wes set to update all fields instead of just key fields.



I think your previous reply helped me work that out , thanks for that.



There is still an issue with time precision within Appeon and this is what I have noticed.



Apps delpoyed via powerServer save time fields with milliseconds while win32 apps do not save the milliseconds and are always 000, why this is unclear but it doesn't cause me an issue now.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.