ocx and flowfield

PoweRoy
Member Posts: 43
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?
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
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
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions