HB_FUNC( ORDKEYNO )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
DBORDERINFO pOrderInfo;
memset( &pOrderInfo, 0, sizeof( pOrderInfo ) );
pOrderInfo.itmOrder = hb_param( 1, HB_IT_STRING | HB_IT_NUMERIC );
pOrderInfo.atomBagName = hb_param( 2, HB_IT_STRING );
/* Either or both may be NIL */
pOrderInfo.itmNewVal = NULL;
pOrderInfo.itmResult = hb_itemPutNL( NULL, 0 );
SELF_ORDINFO( pArea, DBOI_POSITION, &pOrderInfo );
hb_itemReturnRelease( pOrderInfo.itmResult );
}
else
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}
HB_FUNC( ORDKEYCOUNT )
{
AREAP pArea = ( AREAP ) hb_rddGetCurrentWorkAreaPointer();
if( pArea )
{
DBORDERINFO pOrderInfo;
memset( &pOrderInfo, 0, sizeof( pOrderInfo ) );
pOrderInfo.itmOrder = hb_param( 1, HB_IT_STRING | HB_IT_NUMERIC );
pOrderInfo.atomBagName = hb_param( 2, HB_IT_STRING );
/* Either or both may be NIL */
pOrderInfo.itmResult = hb_itemPutNL( NULL, 0 );
SELF_ORDINFO( pArea, DBOI_KEYCOUNT, &pOrderInfo );
hb_itemReturnRelease( pOrderInfo.itmResult );
}
else
hb_errRT_DBCMD( EG_NOTABLE, EDBCMD_NOTABLE, NULL, HB_ERR_FUNCNAME );
}
1) Syntax of USE ... and DBUSEAREA.
2) Is the recordset opened by the ADORDD? If so how does the ADORDD knows the connection object? If ADORDD opens the recordset, does it open with connectionstring or a connection object?
1) Syntax of USE ... and DBUSEAREA.
2) Is the recordset opened by the ADORDD?
If so how does the ADORDD knows the connection object?
If ADORDD opens the recordset, does it open with connectionstring or a connection object?
STATIC oADODB :=""
FUNCTION ADO_OPEN(.....
IF EMPTY(oADODB) //only first time
aWAData[ WA_CONNECTION ] := TOleAuto():New( "ADODB.Connection" )
aWAData[ WA_CONNECTION ]:OPEN(.....
oADODB := aWAData[ WA_CONNECTION ]
ELSE
aWAData[ WA_CONNECTION ] :=oADODB
ENDIF
oRecordSet := TOleAuto():New( "ADODB.Recordset" )
oRecordSet:Open( aWAData[ WA_TABLENAME ], oADODB)
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 92 guests