文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>JDE系统函数详解---JDB_SetSequencing

JDE系统函数详解---JDB_SetSequencing

时间:2010-08-31  来源:zhaocen

作用:

此函数可以让用户在一个初始化的请求句柄上添加数据排序逻辑,通常用在JDB_Select之前。

语法:

JDEDB_RESULT JDB_SetSequencing(HREQUEST hRequest, LPSORT lpSort, uShort nNum, JDEDB_SET nSet);

参数表:

参数 说明 用法

hRequest

请求句柄  

lpSort

排序结构指针  

nNum

排序数量  

nSet

替换或追加现有的字符串  

返回值:

返回值 说明

JDEDB_PASSED

操作成功

JDEDB_FAILED

操作失败

 

事例/* Declare variables associated with JDB_SetSequencing */

HREQUEST hRequest = NULL;

LPSORT lpSort = NULL;

int nNumSort =2;

/* Allocate memory by calling the JDE memory allocation routine */

lpSort = jdeAllocReturnIfError(COMMON_POOL, nNumSort * size of(SORTSTRUCT), MEM_ZEROINIT);

if(lpSort == NULL)

{

return(0);

} /* END IF */

/* Sequencing criteria - this will sort records by ABAN8 and ABALPH in ascending order */

jdeNIDcpy(lpSortlpSort[0].Item.szDict = NID_AN8);

jdeNIDcpy(lpSortlpSort[0].Item.szTable = NID_F0101);

lpSort[0].Item.idInstance = 0;

lpSort[0].nSort = JDEDB_SORT_ASC;

jdeNIDcpy(lpSortlpSort[0].Item.szDict = NID_ALPH);

jdeNIDcpy(lpSortlpSort[0].Item.szTable = NID_F0101);

lpSort[0].Item.idInstance = 0;

lpSort[0].nSort = JDEDB_SORT_ASC;

rcode = JDB_SetSequencing(hRequest, lpSort, nNumSort, JDEDB_SET_REPLACE);

if(rcode != JDEDB_PASSED)

{

printf(“JDB_SetSequencing failed\n”);

} /* END IF */

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载