Hi, I’m trying to use CFRONT to write some values into Attain 4.0. I have a lot of problems finding out on how to convert the c datatypes to something Navision will accept. My destination table has these fields no 1. Code 10 no 5. BigInteger no 10. Text 30 no 24. Boolean no 36. Option no 100. Decimal no 254. Date no 255. Time All the data comes from a text file, so in C I have it as strings. The option field string contains the position number (like “1”) rather than the option in full text. The Boolean is “0” or “1”. Example code looks like this ######################################## DBL_HTABLE hInTable; DBL_HREC hInRec; DBL_S64 tmp_value_s64; char tmpStr[80]; int i,BigI; /…/ hInRec = DBL_AllocRec(hInTable); DBL_InitRec(hInTable, hInRec); /***************************************** CODE FIELD # 1 */ sprintf(tmpStr,“HELLO”); DBL_Str_2_Alpha (Codefeld,sizeof(Codefeld),tmpStr); i = 1; DBL_AssignField(hInTable,hInRec,i,DBL_FieldType(hInTable,i),Codefeld,strlen(Codefeld)+1); / BigInteger # 5 / BigI = 255; sprintf(tmpStr,"%i",BigI); DBL_Str_2_S64(&tmp_value_s64, (DBL_U8) tmpStr); i = 5; DBL_AssignField(hInTable,hInRec,i,DBL_FieldType(hInTable,i),&tmp_value_s64, DBL_FieldSize(hInTable,i)); / Text field # 10 ******************************************/ sprintf(tmpStr,“Hello World”); i = 10; DBL_AssignField(hInTable,hInRec,i,DBL_FieldType(hInTable,i),tmpStr, strlen(tmpStr)+1); ######################################## The documentation is not that clear on how to handle Option and Boolean values. Does anybody know how I can assign an Option or Boolean value to a database field?
Answering my own question here: Both boolean and option field values accept entry in normal integer format - changing the type to the special CFRONT provided types doesn’t seem necessary.