HowTo ADS from (x)Harbour

HowTo ADS from (x)Harbour

Postby reinaldocrespo » 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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: HowTo ADS from (x)Harbour

Postby Antonio Linares » Mon Nov 02, 2015 11:12 pm

Reinaldo,

many thanks! :-)
regards, saludos

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

Re: HowTo ADS from (x)Harbour

Postby dutch » Tue Nov 03, 2015 7:57 am

Thanks Reinaldo,

Great sample&support.
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: HowTo ADS from (x)Harbour

Postby Gale FORd » Tue Nov 03, 2015 2: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.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: HowTo ADS from (x)Harbour

Postby reinaldocrespo » Tue Nov 03, 2015 2:37 pm

Hey Gale,

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

Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: HowTo ADS from (x)Harbour

Postby Gale FORd » Tue Nov 03, 2015 4:00 pm

Thanks
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: HowTo ADS from (x)Harbour

Postby Massimo Linossi » Wed Nov 04, 2015 9: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
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HowTo ADS from (x)Harbour

Postby Patricio Avalos Aguirre » Wed Nov 04, 2015 1: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
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: HowTo ADS from (x)Harbour

Postby reinaldocrespo » 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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: HowTo ADS from (x)Harbour

Postby reinaldocrespo » Thu Nov 05, 2015 12:09 am

Massimo;

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


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: HowTo ADS from (x)Harbour

Postby fraxzi » Thu Nov 05, 2015 7: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
User avatar
fraxzi
 
Posts: 811
Joined: Tue May 06, 2008 4:28 am
Location: Philippines

Re: HowTo ADS from (x)Harbour

Postby Massimo Linossi » Thu Nov 05, 2015 10:03 am

Perfect Reinaldo.
Thank you so much.
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: HowTo ADS from (x)Harbour

Postby Patricio Avalos Aguirre » Sun Nov 08, 2015 2: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
User avatar
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: HowTo ADS from (x)Harbour

Postby dutch » Fri Jul 14, 2017 3: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 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand

Re: HowTo ADS from (x)Harbour

Postby dutch » Fri Jul 14, 2017 7:40 am

I knew the solution now.
** IGNORE Previous Question **
Thanks
Regards,
Dutch

FWH 19.01 / 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)
User avatar
dutch
 
Posts: 1542
Joined: Fri Oct 07, 2005 5:56 pm
Location: Thailand


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 71 guests

cron