 |
|
|  |  |
 |
JetAddColumn ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
Adds a new column to an existing table in an ESE database. |
 |  | | Code examples: |  | |
|
 |  | | Declaration: |  |  |
JET_ERR JET_API JetAddColumn(
__in JET_SESID sesid,
__in JET_TABLEID tableid,
__in JET_PCSTR szColumnName,
__in const JET_COLUMNDEF* pcolumndef,
__in_opt const void* pvDefault,
__in unsigned long cbDefault,
__out_opt JET_COLUMNID* pcolumnid
);
|
 |  |  | | FoxPro declaration: |  |  |
DECLARE INTEGER JetAddColumn IN esent;
INTEGER sesid,;
INTEGER tableid,;
STRING szColumnName,;
STRING @pcolumndef,;
STRING @pvDefault,;
LONG cbDefault,;
INTEGER @pcolumnid
|
 |  |  | | Parameters: |  | sesid
The database session context to use for the API call.
tableid
The table to which to add the column.
szColumnName
The name of the column to add.
pcolumndef
A pointer to a JET_COLUMNDEF structure, which defines the data that can be stored in a column.
pvDefault
A pointer to a buffer that contains the default value for the column.
cbDefault
The size, in bytes, of the buffer that is specified in pvDefault.
pcolumnid
A pointer to a JET_COLUMNID structure, which, on success, will receive the identifier of the newly created column.
|
 |  | | Return value: |  | | Returns the JET_ERR datatype with a predefined return code. |
 |  | | Usage: |  |
PROCEDURE CreateColumn(cColumnName, cColumnType, nColumnLen)
LOCAL nColumnType, nColumnId, cColumnDef
nColumnType = THIS.GetColumnType(m.cColumnType, m.nColumnLen)
nColumnId=0
cColumnDef = num2dword(JET_COLUMNDEF_SIZE) +;
num2dword(0) + num2dword(m.nColumnType) +;
num2word(0) + num2word(0) + num2word(0) + num2word(0) +;
num2dword(m.nColumnLen) + num2dword(0)
THIS.errorno = JetAddColumn(THIS.jetsessionid,;
THIS.jettableid, m.cColumnName,;
@cColumnDef, 0, 0, @nColumnId)
|
 |  | | Word Index links for the JetAddColumn : |  | |
|
 |  | | Translate this page: |  | |  |  | | • |  | | Created: | 2008-01-12 21:03:45 | | Modified: | 2008-01-12 21:07:44 | Visited in last 7 days: 7 |
|
 |
 |
 |
 |
Copyright © 2001-2013
News2News, Inc.
Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use.
The information on this page is presented AS IS, meaning that you may use it at your own risk.
Microsoft Visual FoxPro
and Windows are trade marks
of Microsoft Corp.
All other trademarks are the property of their respective owners.
Privacy policy
|
 |
 |
 |
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc. |
 |
 |
|
 |