FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HowTo ADS from (x)Harbour
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
HowTo ADS from (x)Harbour
Posted: Mon Nov 02, 2015 10:29 PM
Hello everyone.

I have uploaded to one of my hosted servers a few files that demonstrate how to use ADS RDD from (x)Harbour.

http://www.main.structuredsystems.com/adssamples/

AdsQuery.prg is a class that allows you to use ADS SQL queries as an object making it simpler to use.

SampleSQLUsage.prg shows how to use the class plus it should answer some of the most common questions most people from Harbour have about ADS. You will see on this .prg how to use stored procedures in default existence of actual ACE wrappers on rddads.lib. It also shows how to create an ADS Data Dictionary.

For your convenience, these samples work with the "LOCAL"/free server and does not depend on any GUI including FW. I'm a FW user but this sample code is aimed at anyone who wants to use ADS from harbour so I made an effort to write the sample as a simple console app.

“Building rddads.lib.pdf" is just text explaining how to build the necessary .libs to use ACE. Building rddads.lib is as simple as compiling 3 files and then linking them into a .lib. Building ACE32.lib is as simple as importing the lib from the ace32.dll.

I hope this sample files helps other take full advantage or make better use of ADS.

Best,


Reinaldo.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: HowTo ADS from (x)Harbour
Posted: Mon Nov 02, 2015 11:12 PM

Reinaldo,

many thanks! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: HowTo ADS from (x)Harbour
Posted: Tue Nov 03, 2015 07:57 AM

Thanks Reinaldo,

Great sample&support.

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: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: HowTo ADS from (x)Harbour
Posted: Tue Nov 03, 2015 02:25 PM

I get an error when I try to access ADTvsCDX_comparison.prg
I also tried to right click and save link as but the contents show the same error.
I was able to save the other files. Thanks.

You don't have permission to access /adssamples/ADTvsCDX_comparison.prg on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: HowTo ADS from (x)Harbour
Posted: Tue Nov 03, 2015 02:37 PM

Hey Gale,

You are right. I forgot to changed the file permissions. It should download now.

Reinaldo.

Posts: 663
Joined: Mon Dec 05, 2005 11:22 PM
Re: HowTo ADS from (x)Harbour
Posted: Tue Nov 03, 2015 04:00 PM

Thanks

Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: HowTo ADS from (x)Harbour
Posted: Wed Nov 04, 2015 09:10 AM

Hi.
On c function there is this error :

Forbidden
You don't have permission to access /adssamples/adsfunc.c on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Many thanks Reinaldo for these useful functions and informations.
Massimo

Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: HowTo ADS from (x)Harbour
Posted: Wed Nov 04, 2015 01:37 PM

hi Reinaldo

in harbour no exist

Error: Unresolved external '_HB_FUN_ADSCLOSESQLSTATEMENT'

I eat to obtain it for harbour

Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: HowTo ADS from (x)Harbour
Posted: Thu Nov 05, 2015 12:06 AM

Patricio;

¿Que tál?

On that same directory you will find my adsfunc.c. I had to add many of the ACE wrappers. AdsCloseSqlStatement as well as many others are present on my adsfunc.c. I've been trying to have the Harbour developers commit my changes but so far I haven't even been able to learn who is in charge of the ADS RDDs.

So, just download my adsfunc.c and rebuild rddads.lib.

Please let me know how it works after that.

Reinaldo.

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: HowTo ADS from (x)Harbour
Posted: Thu Nov 05, 2015 12:09 AM

Massimo;

You are right. I just fixed that. Please try again. Sorry.

Reinaldo.

Posts: 811
Joined: Tue May 06, 2008 04:28 AM
Re: HowTo ADS from (x)Harbour
Posted: Thu Nov 05, 2015 07:36 AM

Thanks Reinaldo.

Kind Regards,

Frances



Fivewin for xHarbour v18.07

xHarbour v1.2.3.x

BCC 7.3 + PellesC8 ( Resource Compiler only)

ADS 10.1 / MariaDB

Crystal Reports 8.5/9.23 DE

xMate v1.15
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: HowTo ADS from (x)Harbour
Posted: Thu Nov 05, 2015 10:03 AM

Perfect Reinaldo.
Thank you so much.

Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: HowTo ADS from (x)Harbour
Posted: Sun Nov 08, 2015 02:35 AM
Hi reinaldo

mira he revisado la funcion de ads que propones adsfunc.c pero me encuentro que hay muchas diferencias con la actual
funcion no se si la que tengo esta mas obsoleta o no

la que estoy usando la he sacado de aqui

https://github.com/harbour/core/tree/master/contrib/rddads

por ejemplo la que uso utiliza HB_ISLOG y la otra ISLOG

//-------------------------------------------------------------------------------------------------
HB_FUNC( ADSSETDATEFORMAT )
{
UNSIGNED8 pucFormat[ 16 ];
UNSIGNED16 pusLen = 16;

la otra que uso yo

HB_FUNC( ADSSETDATEFORMAT )
{
UNSIGNED8 pucFormat[ 16 ];
UNSIGNED16 usLen = sizeof( pucFormat );

la que uso HB_BOOL hb_ads_bOEM = HB_FALSE;
la otra
BOOL hb_ads_bOEM = FALSE;

HB_FUNC( ADSENABLEENCRYPTION )
{
const char * pucPassword = hb_parcx( 1 );

if( strlen( pucPassword ) )

HB_FUNC( ADSENABLEENCRYPTION )
{
const char * pucPassword = hb_parcx( 1 );

if( *pucPassword )

y asi n de diferencias...



al parecer habria que compatibilizar con la ultima version de ads

estoy utilizando el programa araxis merge que compara archivos y me encuentra muchas diferencia.
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: HowTo ADS from (x)Harbour
Posted: Fri Jul 14, 2017 03:10 AM

How can I connect 2 different ADS server (different license code) with free table in the same time?

Thanks in advance,
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: 1598
Joined: Fri Oct 07, 2005 05:56 PM
Re: HowTo ADS from (x)Harbour
Posted: Fri Jul 14, 2017 07:40 AM

I knew the solution now.
** IGNORE Previous Question **
Thanks

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