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 it 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. 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:
Example:
See the example in the description of Create method
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice