Hi everyone,
I searched the forum for this topic but I didn't find a proper solution.
I want to create a select statement for example on the table purchase header which delivers all fields. But in case of Navision option values I only receive the corresponding integer values. Can anyone tell me how option values are handled by the Navision SQL option and how I can get the optionstring for example for the field document type in the mentioned table. I've Navision 4.00 and SQL 2005.
Thanks a lot.
0
Comments
for Navision option data type corresponding data type of SQL server is an Integer. it means when u use SQL server option in Navision you will find only integer values will be stored in SQL Database.
if you are creating select query in SQL Database then it is not possible to get option string.
Rajesh Patel
The option-values are saved in the Navision-objects that in SQL (and also the Navision DB) are saved as BLOB's.
If you need to show them in a SELECT-statement, you need to program it yourself.
E.g. You might create a new table (DataPerCompany=FALSE) in Navision and maintain in there the values and captions of the option-fields.
In SQL, you can then refer to that table.
The layout of the table is something like this:
"Table ID" : integer ; the ID of the table
"Field ID" : integer : the ID of the option-field in the table
"Option ID" : integer : the ID of the option in that table (this is the internal value of the option.
"Option Value" Text30 : the value of the option (this is the option-value in Navision).
[Topic moved from Navision forum to SQL General forum]
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
Peter