CreateField - method of object PmDatabase

Creation of the column in the table structure.
CreateField(sName As String, nType As Long, nSize As Long) As Boolean
b = oDb.CreateField(Name, Type, Size)
sName(String) Column name
nType(Long) Data type of the column, see: Constants of the PmDatabase object
nSize(Long) Column size. It is entered only if the parameter nType=pmcDbFldText. Otherwise it has no meaning.
Return Values:
true - if the column of the database table was successfully created.
false - otherwise

By repeating the method it is possible to create the desired structure of the database table.

The method is not functional if the Technology configurator is set to Access through ODBC. To create the table in this case it is necessary to use the MSSQL language and the Execute method for the command execution.

See also:
See the example in the description of Create method
PROMOTIC 8.3.19 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice