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
JetGetColumnInfo
..msdn    Add comment     W32 Constants      Translate this page
Retrieves information about a column.
Code examples:
Extensible Storage Engine class library
Declaration:
JET_ERR JET_API JetGetColumnInfo(
  __in          JET_SESID sesid,
  __in          JET_DBID dbid,
  __in          const tchar* szTableName,
  __in          const tchar* szColumnName,
  __out         void* pvResult,
  __in          unsigned long cbMax,
  __in          unsigned long InfoLevel
);
FoxPro declaration:
DECLARE INTEGER JetGetColumnInfo IN esent;
    INTEGER sesid,;
    INTEGER dbid,;
    STRING szTableName,;
    STRING szColumnName,;
    STRING @pvResult,;
    LONG cbMax,;
    LONG InfoLevel
Parameters:
sesid
The database session context to use for the API call.

dbid
Identifies, along with szTableName, the table that contains the column from which the information is retrieved.

szTableName
Identifies, along with dbid, the table that contains the column from which the information is retrieved.

szColumnName
The name of the column that information is fetched for.

pvResult
Pointer to a buffer that will receive the information. The type of the buffer is dependent on InfoLevel. The caller must be configured to align the buffer appropriately.

cbMax
The size, in bytes, of the buffer that is passed in pvResult.

InfoLevel
The type of information to retrieve for the column that is specified by szColumnName.
Return value:
Returns the JET_ERR datatype with a predefined return code.
Usage:
FUNCTION GetColumnIdByName(cColumnName As String) As Number
    LOCAL cColumnDef, nColumnId

    * prepare empty JET_COLUMNDEF structure
    cColumnDef = PADR(num2dword(JET_COLUMNDEF_SIZE),;
        JET_COLUMNDEF_SIZE,CHR(0))

    = JetGetColumnInfo(THIS.jetsessionid, THIS.jetdatabaseid,;
        THIS.jettablename, cColumnName, @cColumnDef,;
        JET_COLUMNDEF_SIZE, JET_ColInfo)

    nColumnId = buf2dword(SUBSTR(cColumnDef, 5, 4))
RETURN m.nColumnId
My comment:
JET_ColInfo and JET_ColInfoByColid both retrieve the same information. pvResult is interpreted as a JET_COLUMNDEF, and the fields of the JET_COLUMNDEF structure are filled in appropriately.
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2008-01-12 21:20:47
Modified: 2008-01-12 21:24:31
Visited in last 7 days: 9
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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.166.203.76)
3 sec.Function: 'WinHttpSetCredentials'
8 sec.Function: 'IsMenu'
11 sec.Function: 'DrawEdge'
16 sec.Function: 'GetTcpTable'
20 sec.Function: 'FindFirstUrlCacheGroup'
25 sec.Function: 'WSACleanup'
30 sec.Function: 'SCardIsValidContext'
35 sec.Function: 'InternetGetLastResponseInfo'
39 sec.Function: 'CreateProcess'
44 sec.Function: 'LoadUserProfile'
Google
Advertise here!