ADO RDD xHarbour

Re: ADO RDD xHarbour

Postby Enrico Maria Giordano » Tue May 12, 2015 11:44 am

Antonio,

AHF wrote:Can it work like this?

index on &( MyFunc( myparams ) ) TO TEMP1 FOR &( MyFunc2( myparams ) )


No, as "myparams" can be a field name. It has to be completely dynamic.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: ADO RDD xHarbour

Postby AHF » Tue May 12, 2015 1:04 pm

Enrico Maria Giordano wrote:Antonio,

AHF wrote:Can it work like this?

index on &( MyFunc( myparams ) ) TO TEMP1 FOR &( MyFunc2( myparams ) )


No, as "myparams" can be a field name. It has to be completely dynamic.

EMG


Enrico,

But what do these functions return? The first Field expression and 2nd cfor expression or the eval result ?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby Enrico Maria Giordano » Tue May 12, 2015 3:18 pm

Antonio,

AHF wrote:But what do these functions return? The first Field expression and 2nd cfor expression or the eval result ?


As an example:

Code: Select all  Expand view  RUN
INDEX ON UPPER( FIELD -> name ) TO MYINDEX FOR UPPER( FIELD -> name ) = "A"


But please note that UPPER() is only a sample. Another example:

Code: Select all  Expand view  RUN
INDEX ON GETTOTALINCOME( FIELD -> id ) TO MYINDEX FOR GETTOTALINCOME( FIELD -> id ) >= 1000


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: ADO RDD xHarbour

Postby AHF » Tue May 12, 2015 3:38 pm

Enrico,

Code: Select all  Expand view  RUN
INDEX ON UPPER( FIELD -> name ) TO MYINDEX FOR UPPER( FIELD -> name ) = "A"


This works. All you have to do is to replace UPPER with SQL UCASE or other SQL equivalent.

Code: Select all  Expand view  RUN
INDEX ON UPPER( FIELD -> name ) TO MYINDEX FOR "UCASE("+ FIELD -> name +")" = "A"


This should work also like this:

Code: Select all  Expand view  RUN
INDEX ON &(GETTOTALINCOME( FIELD -> id )) TO MYINDEX FOR &(GETTOTALINCOME( FIELD -> id ))+ ">= 1000"
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Tue May 12, 2015 4:13 pm

Antonio,

And how we define such indexes on the commands fro ADORDD.

Thanks.
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 Enrico Maria Giordano » Tue May 12, 2015 4:14 pm

Antonio,

this would mean to review all my code and I can't afford it.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: ADO RDD xHarbour

Postby AHF » Tue May 12, 2015 4:38 pm

lucasdebeltran wrote:Antonio,

And how we define such indexes on the commands fro ADORDD.

Thanks.


Lucas,

Replace it in every place such as:

Code: Select all  Expand view  RUN

IF RDDNAME() = "ADORDD"
   INDEX ON ...
ELSE
   INDEX ON as it is
ENDIF
 


Or maybe you can include a command change in INDEX ON... to foresee this situation.

I dont have such a problem because this app already works with ADS.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Tue May 12, 2015 10:03 pm

Antonio,

No, sorry, I ment about SET ADO TABLES INDEX LIST TO <array> and SET ADODBF TABLES INDEX LIST TO commands for such indexes.

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 » Wed May 13, 2015 8:48 am

lucasdebeltran wrote:Antonio,

No, sorry, I ment about SET ADO TABLES INDEX LIST TO <array> and SET ADODBF TABLES INDEX LIST TO commands for such indexes.

Thank you.


Lucas,

I didnt tried I dont have such case.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby AHF » Wed May 13, 2015 11:54 am

Antonio,

Im having a problem with APPEND FROM and COPY TO due to the fact that the scope info array never delivers cForExp and cWhileExp only the code blocks!

This disable us to construct the INSERT INTO with WHERE clause.

Is there any way to get these as literal expressions?
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Wed May 13, 2015 5:16 pm

Antonio,

I mean, for Enrico´s indexes if you could clarify what SET ADO TABLES INDEX LIST TO ... and SET ADODBF TABLES INDEX LIST TO ... should be.

Their usage is not clear neither in source code nor readme.txt.

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 » Wed May 13, 2015 5:36 pm

Lucas,

SET ADO TABLES INDEX LIST TO = indexes without of any clipper like expression only to be used by SQL

SET ADODBF TABLES INDEX LIST TO = indexes with the clipper like expressions needed by the app for its evaluations.

When we use &(indexkey(0)) we cant evaluate a index expression in ADO TABLES "name+dDate+nValue" we will get an error but we can issues a sql select like that.
Thus we need the ADODBF expression "name+DTOS(dDate)+STR(nValue) to do it.

The ADO indexes are for queries the ADODBF are for the normal clipper expressions to allow its evaluation.

Concerning the kind of Enrico indexes since the params are dynamic I assume that they are dynamically created each time they are needed so they dont need to be present in these arrays.

Im finishing APPEND FROM and COPY TO guessing and testing params because the doc its none.
I hope to have it ready tomorrow and Ill post a new version with all NORMAL rdd routines working.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby lucasdebeltran » Wed May 13, 2015 7:30 pm

Antonio,

Thank you.

Have you checked out arrayrdd source code?.
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 » Wed May 13, 2015 8:18 pm

Lucas,

Have you checked out arrayrdd source code?.


Yes but find nothing concerning append or copy.
Regards
Antonio H Ferreira
AHF
 
Posts: 838
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Postby AHF » Thu May 14, 2015 5:31 pm

Completed version adordd at https://github.com/AHFERREIRA/adordd.git
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: No registered users and 60 guests