FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO RDD xHarbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Mon Apr 06, 2015 04:25 PM
Antonio,

I don't understand this line:

dbgoto(nrecno) = adordd - oSet:Bookmark := nrecno


Could you please explain it ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon Apr 06, 2015 04:32 PM
Lucas,

DbSeek only supports searching into 1 field.


Can you post the code example and index used? Here seeks more 1 field.

But the real problem is that data is not saved!!!. When the program is closed, they are lost!.


To us the most important and difficult features are:

1) To have all indexes, record movement, seek, locates and relations emulating 100% ISAM as dbf and ADS.

2) Concurrent access with Transactions.

I dont foresee problems in other features but still not initiated.

As I told you I'm not looking yet for field replaces ,writes etc.
It should work but I really can not tell.

Last version its in trial with transactions!
Please check if your version already has transactions. In this case transactions only be flushed with dbcommit.
We are trying beginstrans with the first lock and committrans with dbcommit or rollbacktrans with ADOBEGINTRANS(nArea).

Could you please try it?
Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon Apr 06, 2015 04:41 PM
Antonio,

Antonio Linares wrote:Antonio,

I don't understand this line:

dbgoto(nrecno) = adordd - oSet:Bookmark := nrecno


Could you please explain it ? thanks


Example:
Code (fw): Select all Collapse
nRec := recno()  // value of bookmark in adordd returned 2.00
....
dbgoto(nRec) // value in ado_gotoid() 2 ors:BookMark := nRec you get a bookmark error!


This means that the value returned from recno() its correct.
Then when passing it to dbgoto() it gets to ado_gotoid() in adordd incorrect.
Bookmark does not assure any specific datatype because it depends on the provider.
Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon Apr 06, 2015 08:24 PM

Lucas,

New version adordd -trial alternative seeks https://github.com/AHFERREIRA/adordd.git

ready : auto open, auto order, relations, record movements (go to, recno, eof, etc), locate and continue, seeks.

Search for "experimental phase" in the code to understand what I m trying to do.

Can you try relations and seeks with a medium size table (> 100.000 records) (both parent and child) on a browse to check performance?

Transactions are automatically called so please dont forget to issue dbcommit after each transaction or data wont be saved.
In this trial transacts are initiated in the first lock and ended in the first dbcommit.

Thanks

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 07:33 AM

Lucas,

Is APPEND BLANK working ?

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 09:01 AM

Antonio,

Please send me addfef.ch.

Thanks

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 09:13 AM

Antonio,

Can you check what function is calling UR_EXISTS ?

Regards

Antonio H Ferreira
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 09:24 AM
AHF wrote:Antonio,

Please send me addfef.ch.

Thanks


Where is such file ? I can't find it in Harbour files neither in FWH ones.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 09:40 AM
Antonio,

AHF wrote:Antonio,

Can you check what function is calling UR_EXISTS ?


In adordd.prg there is:

aADOFunc[ UR_EXISTS ] := @ADO_EXISTS()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 09:51 AM
Antonio,

Where is such file ? I can't find it in Harbour files neither in FWH ones.


Its mentioned in adofuncs.prg

In adordd.prg there is:

aADOFunc[ UR_EXISTS ] := @ADO_EXISTS()


I meant what is the function calling UR_EXISTS ?
Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 11:00 AM

Antonio,

What are these function for?

/ non WorkArea functions /

define UR_EXIT 95

define UR_DROP 96

define UR_EXISTS 97

define UR_RENAME 98

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 11:13 AM

Antonio,

adordd its almost finished and all "light" trials seem to be ok Not one line code changed!:D

adordd its prepared to work the dbseek with selects or :find and the final decision will depend on performance.
It might compensates the trade off between no code change and speed. We will see.

Now I'm missing information asked in my previous posts.

I'm finishing:

APPEND FROM and COPY TO to be parse into sql (INSERT INTO ... SELECT FROM.... ) but shouldn't be a problem.

I'm sure that many bugs will be found but we are getting there. :D

Regards

Antonio H Ferreira
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 01:46 PM
Antonio,

UR_EXIT seems as an EXIT procedure where we can do cleaning if needed.

Regarding the others, dbcmd.c uses them this way:
Code (fw): Select all Collapse
HB_FUNC( HB_DBDROP )
{
   LPRDDNODE  pRDDNode;
   HB_USHORT  uiRddID;
   HB_ULONG   ulConnection;
   const char * szDriver;
   PHB_ITEM   pName;

   szDriver = hb_parc( 3 );
   if( ! szDriver ) /* no VIA RDD parameter, use default */
   {
      szDriver = hb_rddDefaultDrv( NULL );
   }
   ulConnection = hb_parnl( 4 );

   pRDDNode = hb_rddFindNode( szDriver, &uiRddID );  /* find the RDDNODE */
   pName = hb_param( 1, HB_IT_STRING );

   if( pRDDNode && pName )
      hb_retl( SELF_DROP( pRDDNode, pName, hb_param( 2, HB_IT_STRING ),
                          ulConnection ) == HB_SUCCESS );
   else
      hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME );
}

HB_FUNC( HB_DBEXISTS )
{
   LPRDDNODE  pRDDNode;
   HB_USHORT  uiRddID;
   HB_ULONG   ulConnection;
   const char * szDriver;
   PHB_ITEM   pName;

   szDriver = hb_parc( 3 );
   if( ! szDriver ) /* no VIA RDD parameter, use default */
      szDriver = hb_rddDefaultDrv( NULL );

   ulConnection = hb_parnl( 4 );

   pRDDNode = hb_rddFindNode( szDriver, &uiRddID );  /* find the RDD */
   pName = hb_param( 1, HB_IT_STRING );

   if( pRDDNode && pName )
      hb_retl( SELF_EXISTS( pRDDNode, pName, hb_param( 2, HB_IT_STRING ),
                            ulConnection ) == HB_SUCCESS );
   else
      hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME );
}

HB_FUNC( HB_DBRENAME )
{
   LPRDDNODE  pRDDNode;
   HB_USHORT  uiRddID;
   HB_ULONG   ulConnection;
   const char * szDriver;
   PHB_ITEM   pTable, pIndex, pNewName;

   szDriver = hb_parc( 4 );
   if( ! szDriver ) /* no VIA RDD parameter, use default */
      szDriver = hb_rddDefaultDrv( NULL );

   ulConnection = hb_parnl( 5 );

   pRDDNode = hb_rddFindNode( szDriver, &uiRddID );  /* find the RDDNODE */
   pTable = hb_param( 1, HB_IT_STRING );
   pIndex = hb_param( 2, HB_IT_STRING );
   pNewName = hb_param( 3, HB_IT_STRING );
   if( pIndex && ! pNewName )
   {
      pNewName = pIndex;
      pIndex = NULL;
   }

   if( pRDDNode && pTable && pNewName )
      hb_retl( SELF_RENAME( pRDDNode, pTable, pIndex, pNewName,
                            ulConnection ) == HB_SUCCESS );
   else
      hb_errRT_DBCMD( EG_ARG, EDBCMD_EVAL_BADPARAMETER, NULL, HB_ERR_FUNCNAME );
}
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 01:47 PM
Antonio,

adordd its almost finished and all "light" trials seem to be ok Not one line code changed!:D


Excellent! :-)

This is the real power of open source cooperative development:

Fernando and me started thinking about the importance of an ADO RDD and we started coding it. Later Miguel Marchuet cooperated also, and finally you completed it.

Simply great :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue Apr 07, 2015 01:50 PM

Antonio,

Time to announce it in the Harbour devel and users lists ;-)

regards, saludos

Antonio Linares
www.fivetechsoft.com