Using Win32 functions in Visual FoxPro Image Gallery
Extensible Storage Engine (ESE, Jet Blue)
JetAddColumn
JetBeginSession
JetBeginTransaction
JetCloseDatabase
JetCloseTable
JetCommitTransaction
JetCreateDatabase
JetCreateInstance
JetCreateTable
JetDeleteTable
JetDetachDatabase
JetEndSession
JetGetColumnInfo
JetGotoBookmark
JetInit
JetMove
JetOpenTable
JetPrepareUpdate
JetRetrieveColumn
JetRollback
JetSetColumn
JetTerm
JetUpdate
Code examples:
Extensible Storage Engine class library
JetAddColumn
..msdn    Add comment     W32 Constants      Translate this page
Adds a new column to an existing table in an ESE database.
Code examples:
Extensible Storage Engine class library
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-01-12 21:03:45
Modified: 2008-01-12 21:07:44
Visited in last 7 days: 19
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.91.38.173)
7 sec.Function: 'GetCapture'
13 sec.Function: 'CeRegEnumKeyEx'
20 sec.Function: 'CeCreateProcess'
27 sec.Function: 'SHGetFileInfo'
34 sec.Function: 'IsPwrSuspendAllowed'
41 sec.Function: 'EnumDisplaySettings'
49 sec.Function: 'WTSOpenServer'
56 sec.Function: 'GdipGetPropertyItemSize'
1.05 min.Function: 'ws_connect'
1.17 min.Function: 'FreeEnvironmentStrings'
Google
Advertise here!