
I really wish that this ADO RDD gets completed and you are doing a great job

AdoRdd will become a great tool for harbour/xHarbour users
Code: Select all
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 );
}
Code: Select all
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 );
}
Please answer whatever you know regarding these questions, thanks1) 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?
Exactly the same as for other Rdds1) Syntax of USE ... and DBUSEAREA.
Yes. With ADO_OPEN( nWA, aOpenInfo )2) Is the recordset opened by the ADORDD?
Its ADRDD that opens the connection object each time USE gets calledIf so how does the ADORDD knows the connection object?
It does it with connection object opened as indicated above.If ADORDD opens the recordset, does it open with connectionstring or a connection object?
Code: Select all
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)