FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour ADS question?
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
ADS question?
Posted: Wed Mar 26, 2008 02:03 AM

Dear All,

I've used Clip52e/FW/Comix,Clipmore.
Now I move to xHB.Com/ FWH /ADS.
Which do I include .CH file to my .prg?

ADS.CH
DBFCDXAX.CH
etc...

Thanks&Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
ADS question?
Posted: Wed Mar 26, 2008 03:44 AM

I work with Borland version of xHarbour.org. Only ads.ch is enough. dbfcdxax.ch is for Clipper 16bit

Regards



G. N. Rao.

Hyderabad, India
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
ADS question?
Posted: Wed Mar 26, 2008 05:12 AM

Hi Mr. NageswaraRao, G.

Greeting from Indonesia

Can I get samples how to use ADS ?

Regards
Fafi

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
ADS question?
Posted: Wed Mar 26, 2008 05:19 AM
Simple sample

#include "fivewin.ch"
#include "ads.ch"

function Main()

   RddRegister( "ADS", 1 )
   AdsSetServerType( ADS_LOCAL_SERVER )  // 1
   USE CUSTOMER NEW SHARED VIA "ADSCDX"  // or "ADSNTX" or "ADT"
   BROWSE()

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 169
Joined: Mon Feb 25, 2008 02:42 AM
ADS question?
Posted: Wed Mar 26, 2008 05:25 AM

Thank's for quick reply

Regards
Fafi

Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
ADS question?
Posted: Wed Mar 26, 2008 08:11 AM
Dear nageswaragunupudi,

nageswaragunupudi wrote:I work with Borland version of xHarbour.org. Only ads.ch is enough. dbfcdxax.ch is for Clipper 16bit


How can I use Filter for ADS? May I have samples?

Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
ADS question?
Posted: Wed Mar 26, 2008 08:23 AM

Mr Duch

Use the filters in the normal way.
SET FILTER TO ..............
or
DbSetFilter( .... )

The rddads.lib converts these function into ADS native filter functions.

But please keep these points in mind.

Please do not use UDFs. We should use expressions that the Server should understand. That is no alias names. If we have indexes on the fieldnames used in the filter expression, ADS Server creates bitmap filter very fast. ( like comix, six, etc ). If not the ADS server can not fully optimise the filter. In such cases, the unopimised portion is to be resolved at the client level. This normally delays execution.

Once you get used to the ADS functionality and like to use the direct ADS functions, then the rddads.lib supports such direct calls also. For Ads documentation, I suggest you download ARC ( Advantage Data Architect ) from ADS website. This is free. Its help file gives all documentation of ACE32.DLL . RddAds.lib in turn calls these functions in ace32.dll.

But to start with use well known functions like dbsetfilter or the usual commands.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
ADS question?
Posted: Wed Mar 26, 2008 04:59 PM

How different between DbSetFilter() and AdsSetAof()?
Which one does faster?
How can I know how many record are match with filter()

Regards,
Dutch

Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
ADS question?
Posted: Wed Mar 26, 2008 10:53 PM

When you call DbSetFilter, rddads.lib in turn calls AdsSetAof. DbSetFilter sets the filter both at rdd level and also at ads server level with AdsSetAof, so that the filter works even when the expression is not valid for AdsFilter.

To start with it is better to use DbSetFilter.

AdsKeyCount() gives the number of filterd records, after the filter is set.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
ADS question?
Posted: Thu Mar 27, 2008 06:10 PM
Dear nageswaragunupudi,

Where can I find the ADS function document for using with xHB&FWH?

nageswaragunupudi wrote:
AdsKeyCount() gives the number of filterd records, after the filter is set.


Regards,
Dutch
Regards,

Dutch



FWH 2304 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio

FWPPC 10.02 / Harbour for PPC (FTDN)

ADS V.9 / MySql / MariaDB

R&R 12 Infinity / Crystal Report XI R2

(Thailand)

Continue the discussion