iam inserting data into item table using ADO but the issue is when iam inserting an item with item category code character length >10 the insert fails for the record
i tried to increase the item category code for item from the table designer but i get the same overflow error
any ideas?
Regards,
GD
0
Comments
The field is linked to several other tables. All these tables have to be changed in order for you to be able to use the information after you have imported it.
However if you are looking for an optin to import, and then handle the problems later, it should be enough to increase the lenght in Item (like you have done) and in table "Item Category"
But as I said, be careful! Everytime a code, table, report etc uses Item Catagory, it will be expecting 10 charecters. And this will create frustrated users as navision will make an overflow error.
you can chop your code (if you want) better to change it yourself but anyway
"Item Category".CODE := COPYSTR(YourImportedDataHere, 1, 10);
http://www.BiloBeauty.com
http://www.autismspeaks.org
RIS Plus, LLC
and put details in Description field.
Because Iem category Code is linked with Sales line, Purchase line and
so many other tables.
Senior Consultan
Code fields are either 10 or 20 Characters
Master tables have Code(20) fields as primary keys
Supplemental tables have Code(10) fields as primary keys
Item Category is a supplemental table. Yiou will have far less problems if you adhere to these and the other rather simple rules when working with Navision.