hi there,
i'm trying to get data out of a database in c# with the cfront ocx (navision 3.70)
if i use the database file (chronus), table language, the last field column(windows language name) is empty. this column is a flowfield.
but how do i use the calcfields function?
int k = 0;
fNumber = 0;
do
{
dRow = dTable.NewRow();
fNumber = cf.NextField(hTable,fNumber);
do
{
if (fNumber == 7)
{
object tempffield = new object();
tempffield = fNumber;
cf.CalcFields(hTable,hRecord, ref tempffield);
}
dRow[k] = cf.FieldToStr(hTable, hRecord, fNumber);
fNumber = cf.NextField(hTable,fNumber);
k++;
} while (fNumber != 0);
dTable.Rows.Add(dRow);
k = 0;
fNumber = 0;
}while (cf.NextRec(hTable,hRecord, 1) != 0);
but this code gives me a type dont match...
suspect the object var is a pain in the ass, are there other ways to do this?
PS: i did the flowfield detection hardcoded (fNumber == 7), cause if i check what each fieldtype was returned that it was 0 just like the field Name :S
code = 5
name = 0
windows language = 4
windows language name = 0