Page 31 of 70

Re: ADO RDD xHarbour

PostPosted: Sat May 02, 2015 5:52 pm
by AHF
Lucas,

Ok thanks.

How are you trials going?

Re: ADO RDD xHarbour

PostPosted: Sat May 02, 2015 9:10 pm
by lucasdebeltran
Antonio,

I am waiting for last version with locates, dates and Numbers fixed.

Thank you.

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 8:53 am
by AHF
Antonio,

Im taking care of exclusive use but throwing the error doesnt do nothing the program just continues.
The same if oRecordSet in NIL

What might be the problem?

Code: Select all  Expand view

   //OPEN EXCLUSIVE
   IF !aWAData[ WA_OPENSHARED ]
   
       aLockInfo[ UR_LI_METHOD ] := DBLM_EXCLUSIVE
       aLockInfo[ UR_LI_RESULT ] := .F.
       ADO_LOCK( nWA, aLockInfo )   

       IF !aLockInfo[ UR_LI_RESULT ]

MSGINFO("ERROR ADOPEN") //IT COMES HERE BUT DO NOTHING ! WHY?

          oError := ErrorNew()
          oError:GenCode := EG_OPEN
          oError:SubCode := 1001
          oError:Description := hb_langErrMsg( EG_OPEN )
          oError:FileName := aOpenInfo[ UR_OI_NAME ]
          oError:OsCode := 0 // TODO
          oError:CanDefault := .T.
          NETERR(.T.)
          UR_SUPER_ERROR( nWA, oError )
          RETURN HB_FAILURE      
         
       ENDIF

   ENDIF       

   oRecordSet :=  TOleAuto():New( "ADODB.Recordset" )

   IF oRecordSet == NIL
      oError := ErrorNew()
      oError:GenCode := EG_OPEN
      oError:SubCode := 1001
      oError:Description := hb_langErrMsg( EG_OPEN )
      oError:FileName := aOpenInfo[ UR_OI_NAME ]
      oError:OsCode := 0 /* TODO */
      oError:CanDefault := .T.

      UR_SUPER_ERROR( nWA, oError )
      RETURN HB_FAILURE
   ENDIF
 

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 4:36 pm
by lucasdebeltran
Antonio,

What are the differences between SET ADO TABLES INDEX LIST TO and SET ADODBF TABLES INDEX LIST TO?.

Tryadordd.prg explanation is not clear.

Also, in last versión locking does not work.

Also, OrdSetFocus() fails too.

I suggest you to try with XBROWSER FASTEDIT.

With this command, you will be able to add, modify, delete records... etc and you will be able to find bugs.

Thank you.

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 5:18 pm
by AHF
Lucas,

Please check your version.ADOVERSION() in adordd and inform.

SET ADO TABLES INDEX LIST TO these are the indexes for adordd without any dbf expressions for ado framework
Ex index expression "date+nrcod+id"

SET ADODBF TABLES INDEX LIST TO are the indexes with dbf expressions as you use in your dbf application
Ex index expression "dtos(date)+str(nrcod)+id"

Dont forget that the ADODBF are the index expressions to be evaluated like Indexkey() or &(indexkey())and all index functions.

Locking should be working although with some bugs now corrected.
It was not releasing all locks.
If you dont have any autoinc field indicated to adordd you will get problems.

Orsetfocus() is already working ok since the last couple of verions.
We ve using it without any errors.
Could you post the error and the index expression?

I dont work with xbBrowse in this app and I dont have it.

Ill post a new version today working ok with:

Dates and numbers
Exclusive use
Locking

Missing to do:

append from
copy to

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 5:30 pm
by lucasdebeltran
Antonio,

So SET ADO TABLES INDEX LIST TO and SET ADODBF TABLES INDEX LIST TO must be defined both or just one?.

I will recheck with today´s new version.

Thank you.

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 5:46 pm
by AHF
Lucas,

Always both with same size an order.
One for ado framework the other for all usual index functions to work correctly.

The SET ADODBF TABLES INDEX LIST TO must follow the (x)Harbour usual syntax.

The SET ADO TABLES INDEX LIST TO its for SQL it might even contain SQL functions.

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 7:54 pm
by AHF
New version adordd at https://github.com/AHFERREIRA/adordd.git

Locks and exclusive use working.

Dates and numbers working.

Locates working.

Any app code change required. Just Link it.

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 8:21 pm
by Antonio Linares
Great job Antonio! :-)

Re: ADO RDD xHarbour

PostPosted: Mon May 04, 2015 8:59 pm
by AHF
Antonio,

Thanks,

Now its only missing:

APPEND FROM
COPY TO

What are the rdd functions for this?

Also what is the porpose of HB_DBDROP HB_DBRENAME? Its ily for sql?

How do you call it from app?

Re: ADO RDD xHarbour

PostPosted: Tue May 05, 2015 8:34 am
by AHF
Antonio,

I need your help.

What are these doing?

/* non WorkArea functions */
#define UR_INIT this I know!
#define UR_EXIT 95
#define UR_DROP = ADO_DROP (DROP TABLE OR INDEX)
#define UR_EXISTS = ADO_EXISTS (TABEL EXIST?)
#define UR_RENAME 98
#define UR_RDDINFO This I kow


In previous version of adordd from Fernando and Miguel they are redirected to ado_.
I think these are rdd driver related functions so that redirection is wrong.

Can you confirm?

Re: ADO RDD xHarbour

PostPosted: Tue May 05, 2015 8:41 am
by Antonio Linares
Antonio,

You have to check how those commands are translated:

#command APPEND [FROM <(f)>] [FIELDS <fields,...>] ;
[FOR <for>] [WHILE <while>] [NEXT <next>] ;
[RECORD <rec>] [<rest:REST>] [ALL] ;
[DELIMITED [WITH <*delim*>]] [CODEPAGE <cp>] => ;
__dbDelim( .F., <(f)>, <(delim)>, { <(fields)> }, ;
<{for}>, <{while}>, <next>, <rec>, <.rest.>, <cp> )


Now look in Harbour source code for __dbDelim() code

Re: ADO RDD xHarbour

PostPosted: Tue May 05, 2015 8:45 am
by Antonio Linares
It is finally redirected to HB_FUNC( __DBTRANS ):

...

errCode = SELF_TRANS( dbTransInfo.lpaSource, &dbTransInfo );

Re: ADO RDD xHarbour

PostPosted: Tue May 05, 2015 8:45 am
by Antonio Linares
Antonio,

Have you look for those UR_ defines in all Harbour sources ?

Re: ADO RDD xHarbour

PostPosted: Tue May 05, 2015 8:46 am
by AHF
Antonio,

Thanks