ADO RDD xHarbour

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

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

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

Re: ADO RDD xHarbour

Post by AHF »

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
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: ADO RDD xHarbour

Post by Enrico Maria Giordano »

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

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

INDEX ON GETTOTALINCOME( FIELD -> id ) TO MYINDEX FOR GETTOTALINCOME( FIELD -> id ) >= 1000
EMG
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Enrico,

Code: Select all

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

INDEX ON UPPER( FIELD -> name ) TO MYINDEX FOR "UCASE("+ FIELD -> name +")" = "A"
This should work also like this:

Code: Select all

INDEX ON &(GETTOTALINCOME( FIELD -> id )) TO MYINDEX FOR &(GETTOTALINCOME( FIELD -> id ))+ ">= 1000"
Regards
Antonio H Ferreira
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: ADO RDD xHarbour

Post by lucasdebeltran »

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

Re: ADO RDD xHarbour

Post by AHF »

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

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
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: ADO RDD xHarbour

Post by lucasdebeltran »

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

Re: ADO RDD xHarbour

Post by AHF »

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: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

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
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: ADO RDD xHarbour

Post by lucasdebeltran »

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

Re: ADO RDD xHarbour

Post by AHF »

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
User avatar
lucasdebeltran
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am
Contact:

Re: ADO RDD xHarbour

Post by lucasdebeltran »

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

Re: ADO RDD xHarbour

Post by AHF »

Lucas,
Have you checked out arrayrdd source code?.
Yes but find nothing concerning append or copy.
Regards
Antonio H Ferreira
AHF
Posts: 837
Joined: Fri Feb 10, 2006 12:14 pm

Re: ADO RDD xHarbour

Post by AHF »

Completed version adordd at https://github.com/AHFERREIRA/adordd.git
Regards
Antonio H Ferreira
Post Reply