You are on page 1of 3

jdeGT_OpenTable

Last Modified: B9 | October 2, 2020

This function will allow the Media Object table (F00165) to be opened based of the
Object name or datasource.

Syntax

JDERTN(JDEDB_RESULT) JDEWINAPI jdeGT_OpenTable(


HUSER hUser,
PJSTR pszDataSource,
PJSTR pszObjectName,
HREQUEST *hRequestGT);

Parameters
Parameter Notes Usage
hUser Input/Require User handle
pszDataSource Input/Not required If empty, use the default
datasource from the
pszObejctName. Datasource
has precedence over the
ObjectName.
pszObjectName Input/Not required Require if pszDatasource is
empty.
hRequestGT Output If open table fails, NULL
pointer will be returned;
otherwise a pointer to the
handle will be returned.

Return Value
Return Value Description
JDEDB_PASSED Return value if this API succeeds
JDEDB_FAILED Return value if this API fails

493192507.doc 1
jdeGT_OpenTable

Example
Sample #1: Using Datasource

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


HREQUEST hRequestGT = NULL;
HUSER hUser = NULL;
JCHAR szFromDatasource[51] = _J(“Business Data – Adev733o”);
JCHAR szObjectName[11] = _J(“”);

JDBReturn = JDB_InitBhvr(.., &hUser);

JDBReturn = jdeGT_OpenTable (hUser, szFromDatasource, szObjectName, &hRequestGT);


if (JDBReturn == JDEDB_PASSED)
{


}

jdeGT_CloseTable(hRequestGT);
JDB_FreeBhvr(hUser);

return;

Sample #2: Using Object Name

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


HREQUEST hRequestGT = NULL;
HUSER hUser = NULL;
JCHAR szFromDatasource[51] = _J(“ ”);
JCHAR szObjectName[11] = _J(“ABGT”);

JDBReturn = JDB_InitBhvr(.., &hUser);

JDBReturn = jdeGT_OpenTable (hUser, szFromDatasource, szObjectName, &hRequestGT);


if (JDBReturn == JDEDB_PASSED)
{


}

jdeGT_CloseTable(hRequestGT);
JDB_FreeBhvr(hUser);

return;

Additional Notes
 This API must be used first if the related functions are to be used.
 This API is used for multiple access of the table within one function scope.

B9 January, 2002 2
jdeGT_OpenTable

See Also

Function Name Description


jdeGT_OpenTable Open F00165 and return the table handle
jdeGT_CloseTable Close F00165 and release table handle
jdeGT_SelectData Select data from F00165 table
jdeGT_SelectDataKeyStr Select data from F00165 table with formatted string
(TXKY)
jdeGT_FetchData Retrieve record from F00165
jdeGT_UpdateData Update record to F00165
jdeGT_UpdateDataKeyStr Update record to F00165 with formatted string (TXKY)
jdeGT_InsertData Insert record to F00165
jdeGT_InsertDataKeyStr Insert record to F00165 with formatted string (TXKY)
jdeGT_DeleteData Delete record from F00165
jdeGT_DeleteDataKeyStr Delete record from F00165 with formatted string
(TXKY)

B9 January, 2002 3

You might also like