Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CreateField - method of object PmDatabase

Description:
Creation of the column in the table structure.
Syntax:
CreateField(sName As String, nType As Long, nSize As Long) As Boolean
Calling:
b = oDb.CreateField(Name, Type, Size)
Parameters:
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
Note:

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:
Example:
See the example in the description of Create method
PROMOTIC 8.3.21 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