Null not allowed in textfileds on sql server

roynes
Member Posts: 23
I have created a table in NAV, an external application is filling data into this SQL table.
but the external apllication have problem when inserting records with "Null" values in one of the fields.
Does anyone know how to change the field propperty, so the field accept Null values?
/roynes
but the external apllication have problem when inserting records with "Null" values in one of the fields.
Does anyone know how to change the field propperty, so the field accept Null values?
/roynes
0
Comments
-
Sorry, but NULL is not allowed in tables that are used by NAV. So set the NAV default values.
BLANK for VarChar
1754-01-01 00:00:00.000 for DAte and time
False for Bool
and so on ........Do you make it right, it works too!0 -
I think i have tried to set default value on the fields property, without succsess. I guessed that the default value set in navision only would be used when filling data from C/C-Side, and not when using an sql/odbc "Insert Into" ., but i wil try it again.
Thanks /roynes0 -
roynes wrote:I think i have tried to set default value on the fields property, without succsess. I guessed that the default value set in navision only would be used when filling data from C/C-Side, and not when using an sql/odbc "Insert Into" ., but i wil try it again.
Thanks /roynes0 -
As already pointed out you do have to be careful with code fields and date fields when you're working with data in SQL that is to be read by NAV.
When integrating with other systems this way I normally make most of the fields text (i.e. varchar) and then clean up and evaluate the data in a codeunit, report or other process in NAV. Then even if the other system doesn't upper case code fields or setup other values correctly you a trigger point in NAV where you can do that kind of simple clean up work.0 -
roynes wrote:I think i have tried to set default value on the fields property, without succsess. I guessed that the default value set in navision only would be used when filling data from C/C-Side, and not when using an sql/odbc "Insert Into" ., but i wil try it again.
Thanks /roynes
I mean with set the NAV default values the following: You must set it, as Belias saied, with your externel application that creates this records.Do you make it right, it works too!0 -
[Topic moved from 'NAV/Navision' forum to 'SQL General' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
On alter database - integration tab, there is a maintain defaults checkbox.
IF you check this, then NAV will set the default settings for every column in every table in SQL Server.
If an outsider does a SQL insert that does not insert all the columns in a table, SQL Server will then fill in the default values.
This works very well as long as a SQL only person does not start messing with the constraints and mess up the standard naming convention NAV uses.David Machanick
http://mibuso.com/blogs/davidmachanick/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