Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CreateField - method of the PmaDatabase object

Description:
Creates the column in the table structure.
Syntax:
Boolean CreateField(String sName, Long nType, Long nSize)
Parameters:
sName(String) Column name
nType(Long) Data type of the column
1 - Boolean
2 - Byte
3 - Integer
4 - Long
6 - Single (4-byte real number)
7 - Double (8-byte real number)
8 - Date (Date and time)
10 - String
11 - LongBinary
12 - Memo
nSize(Long) The size of column. It is entered only if the parameter nType=10. 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.

This 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 MS SQL language and call the Execute method for the command execution.

See also:
Example1:
JavaScriptVBScriptSelect and copy to clipboard

var bCreateField = oDb.CreateField("note", 10, 50);
Example2:
See the example in the description of the Create method
PROMOTIC 9.0.13 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