FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADO RDD xHarbour
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Sat May 02, 2015 05:52 PM

Lucas,

Ok thanks.

How are you trials going?

Regards

Antonio H Ferreira
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: ADO RDD xHarbour
Posted: Sat May 02, 2015 09:10 PM

Antonio,

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

Thank you.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 08:53 AM
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 (fw): Select all Collapse
   //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
Regards

Antonio H Ferreira
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 04:36 PM

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.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 05:18 PM

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

Regards

Antonio H Ferreira
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 05:30 PM

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.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 05:46 PM

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.

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 07:54 PM

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.

Regards

Antonio H Ferreira
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 08:21 PM

Great job Antonio! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Mon May 04, 2015 08:59 PM

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?

Regards

Antonio H Ferreira
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue May 05, 2015 08:34 AM

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?

Regards

Antonio H Ferreira
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue May 05, 2015 08:41 AM
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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue May 05, 2015 08:45 AM

It is finally redirected to HB_FUNC( __DBTRANS ):

...

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: ADO RDD xHarbour
Posted: Tue May 05, 2015 08:45 AM

Antonio,

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 838
Joined: Fri Feb 10, 2006 12:14 PM
Re: ADO RDD xHarbour
Posted: Tue May 05, 2015 08:46 AM

Antonio,

Thanks

Regards

Antonio H Ferreira