Deleting a field with the datetime data type

AlexWiley
Member Posts: 230
I was surprised I didn't see this posted elsewhere when searching, so if this is a repeat I apologize. I'm trying to clear out a datetime field so I can remove the column from a table object, but even with the SQL value set to allow null and null being the default, it still defaults a date time and won't let me remove it. I appreciate any insights on getting this field removed!
0
Comments
-
DON'T PUT 'NULL' SQL VALUES IN NAVISION DATABASE, UNLESS YOU WANT TO HAVE SOME TROUBLE!!!
create a codeunit in navision:mytable.reset; mytable.modifyall(myfield,0DT,[runtrigger]);
it is correct to have that default datetime, this is how nav works
EDIT: where "runtrigger" is true or false...see online help if you don't know this function0 -
Yeah, I think I created some major issues for myself with the null values. That's what dev environments are for though, right?
Restarted and used your code, worked perfectly to clear the field out, thank you very much!0 -
you're welcome!
null value for code and text: '' (double quotemark)
null value for decimal and int: 0
null value for datetime = 0DT
null value for date = 0D
null value for time = 0T
universal nullifier = function CLEAR(variable)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