CFRONT modifying an existing table

PBVS
Member Posts: 6
Hi,
I’ve written a program in VB that inserts data into a user defined navision table. These tables need two control fields that if not exits the program should create. A datefield and a Boolean.
I made a function that checks if these two fields already exist, if they don’t the program tries to add them to the table. I’ve added a piece of code that I use to create the extra fields in the table pointed to by TablePTR. The program runs without generating an error or warning, so every thing looks fine, but nothing has happened to the table.
What am I doing wrong? I’m at a loss, so if anybody has an idea, they’re welcome!!
Table_Name = cf.TableName(TablePTR)
Correct1 = True
Call cf.CreateTableBegin(CreateTablePTR, Table_No, Table_Name, Correct1)
Field_Type = 3
Field_Class = 0
Call cf.AddTableField(CreateTablePTR, ExportFieldNo1, FieldName1,
Field_Type, FLen, OptStr, Field_Class)
Call cf.CreateTable(CreateTablePTR)
Field_Type = 1
Call cf.AddTableField(CreateTablePTR, ExportFieldNo2, FieldName2,
Field_Type, FLen, OptStr, Field_Class)
Call cf.CreateTable(CreateTablePTR)
Call cf.CreateTableEnd(CreateTablePTR)
I’ve written a program in VB that inserts data into a user defined navision table. These tables need two control fields that if not exits the program should create. A datefield and a Boolean.
I made a function that checks if these two fields already exist, if they don’t the program tries to add them to the table. I’ve added a piece of code that I use to create the extra fields in the table pointed to by TablePTR. The program runs without generating an error or warning, so every thing looks fine, but nothing has happened to the table.
What am I doing wrong? I’m at a loss, so if anybody has an idea, they’re welcome!!
Table_Name = cf.TableName(TablePTR)
Correct1 = True
Call cf.CreateTableBegin(CreateTablePTR, Table_No, Table_Name, Correct1)
Field_Type = 3
Field_Class = 0
Call cf.AddTableField(CreateTablePTR, ExportFieldNo1, FieldName1,
Field_Type, FLen, OptStr, Field_Class)
Call cf.CreateTable(CreateTablePTR)
Field_Type = 1
Call cf.AddTableField(CreateTablePTR, ExportFieldNo2, FieldName2,
Field_Type, FLen, OptStr, Field_Class)
Call cf.CreateTable(CreateTablePTR)
Call cf.CreateTableEnd(CreateTablePTR)
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