C/FRONT error: Field contains tens in time

Michael_Weigand
Member Posts: 14
I am trying to read from the time field in the Object table like this:
oTime = ocx.GetFieldData( htable, hRec, 11 )
c/front displays an error message:
---
C/FRONT error: 10120
C/FRONT error: Field contains tens in time
---
Where's the problem?
oTime = ocx.GetFieldData( htable, hRec, 11 )
c/front displays an error message:
---
C/FRONT error: 10120
C/FRONT error: Field contains tens in time
---
Where's the problem?
0
Comments
-
Hi
Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'. It could be the reason. Hope it is of any help <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
Regards
Andreas0 -
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Andreas Lundin:
Maybe the time format in the OCX is defined by an integer number istead of a string holding the data like '12:30:00'.<HR></BLOCKQUOTE>
I declared the variable for the return value as variant. I don't think the data type is the problem.0 -
If I ask for the time I use a String.
And that works!
Jan0 -
I think there's something special about the Object table. Reading from the 'Time' field works as long as 'Geändert' ('changed' or 'modified' in English version?) is false. Strange...0
-
Check cf.h file:
typedef DBL_U32 DBL_TIME;
Time is 32 bit unsigned integer.0 -
For some reason (still trying to find out), Navision sometimes stores the time property of the objects in miliseconds as well.
Try running a report wich rounds the time in the object table:
Report on Object, On after get record
v_DateTime[1] := CREATEDATETIME (Date,Time);
v_DateTime[2] := ROUNDDATETIME(v_DateTime[1],1000,'=');
v_duration := v_DateTime[1] - v_DateTime[2];
IF v_duration <> 0 THEN BEGIN
Time := DT2TIME (v_DateTime[2]);
MODIFY;
end;
Be sure to check modification permission in the object permission table!
Round the time manually when changing objects and you should be fine.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions