CreateField - method of object PmDatabase

Creates 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 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. In this case to create the table 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.30 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