The option field type and SQL

Hi I have a strange error. When I try to insert a record into a table and setting the value of a Option field type I get this error “Assignment error”. I can insert values into text, date and number fields but not this option field (or any). The option field has 2 values of type text and the sting I am trying to insert is exactly the same as 1 of the values in the option field list. I am using Navision Financials 2.00A and CODBC. Any held greatly appreciated. With thanks in advance, Oskar Jensson

Hi, You can’t insert a text into an option field. Instead, you must insert the corresponding number of the OptionString, for example: If the optionstring is “Never,Sometimes,Always” and you want to insert the option “Always”, insert value 2, the number “2” means the position in the optionstring where “Always” is. Remember that the index starts at 0, not 1. So the valid values for this option whould be: 0,1 and 2. Regards.

Just the info I needed. Thanks a lot [:)] Regards, Oskar

You’re welcome. Regards.