ADO RDD xHarbour

Re: ADO RDD xHarbour

Postby AHF » Sat May 02, 2015 5:52 pm

Lucas,

Ok thanks.

How are you trials going?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Sat May 02, 2015 9: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: ADO RDD xHarbour

Postby AHF » Mon May 04, 2015 8: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: Select all  Expand view  RUN

   //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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Mon May 04, 2015 4: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: ADO RDD xHarbour

Postby AHF » Mon May 04, 2015 5: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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Mon May 04, 2015 5: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: ADO RDD xHarbour

Postby AHF » Mon May 04, 2015 5: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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby AHF » Mon May 04, 2015 7: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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby Antonio Linares » Mon May 04, 2015 8:21 pm

Great job Antonio! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ADO RDD xHarbour

Postby AHF » Mon May 04, 2015 8: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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby AHF » Tue May 05, 2015 8: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
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby Antonio Linares » Tue May 05, 2015 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ADO RDD xHarbour

Postby Antonio Linares » Tue May 05, 2015 8:45 am

It is finally redirected to HB_FUNC( __DBTRANS ):

...

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ADO RDD xHarbour

Postby Antonio Linares » Tue May 05, 2015 8:45 am

Antonio,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42120
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: ADO RDD xHarbour

Postby AHF » Tue May 05, 2015 8:46 am

Antonio,

Thanks
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 45 guests