Options

CFRONT modifying an existing table

PBVSPBVS Member Posts: 6
edited 2002-03-19 in Navision Financials
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)
Sign In or Register to comment.