FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour mod_harbour and ADS server
Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
mod_harbour and ADS server
Posted: Fri Apr 10, 2020 04:36 PM

Hello,
at the moment samples/ads.prg throws an error:

Error: Unknown or unregistered symbol
operation: ADSSETSERVERTYPE
called from: HB_HRBLOAD, line: 0
called from: ../apache.prg, EXECUTE, line: 143

on both mod_harbour and our testserver. Can we do something about it?
Is ADS remote server supported?

Thanks,
Taavi.

Posts: 97
Joined: Mon Nov 21, 2005 10:29 AM
Re: mod_harbour and ADS server
Posted: Wed Apr 15, 2020 06:20 PM

Hi,
Just wanted to say that with some help from Antonio ADS remote server is working smoothly with mod_harbour now.

Just put ADS dll-s (and ads.ini if needed) in Apache/bin and verify if ADS dll-s are 64-bit for 64-bit Apache (or use 32-bit Apache for 32-bit ADS dll-s).

Thanks, Antonio.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: mod_harbour and ADS server
Posted: Thu Apr 16, 2020 07:45 AM
Glad to know that mod_harbour is working fine as expected.

Harbour for the web power! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 257
Joined: Mon Jun 10, 2013 06:40 PM
Re: mod_harbour and ADS server
Posted: Thu May 28, 2020 05:34 PM

Taavi
Podrias decirme cuales dll fueron los que pasaste

Gracias.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: mod_harbour and ADS server
Posted: Thu May 28, 2020 07:35 PM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: mod_harbour and ADS server
Posted: Mon Jun 15, 2020 02:55 AM
Hola

he bajado el archivo y he pegado los dll en C:\xampp\apache\bin

ace64.dll
ace64.lib
axcws64.dll
Ads.ini

pero aun recibo el error

Error: Unknown or unregistered symbol
operation: ADSSETSERVERTYPE
called from: HB_HRBLOAD, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 70

Source:
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: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: mod_harbour and ADS server
Posted: Mon Jun 15, 2020 03:57 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: mod_harbour and ADS server
Posted: Mon Jun 15, 2020 04:44 AM
gracias Antonio funciono!!!

para que funcione lo que hice fue esto

copiar los archivos en C:\xampp\apache\bin
ace64.dll
ace64.lib
axcws64.dll
adsloc64.dll
Ads.ini


ejemplo
Code (fw): Select all Collapse
function Main()

   ? RddRegister( "ADS", 1 )
   ? AdsSetServerType( 1 ) // ADS_LOCAL_SERVER )
   ? RDDSetDefault( "ADS" )
   ? RddSetDefault()

   /*
   DbCreate( hb_GetEnv( "PRGPATH" ) + "/data/test.dbf",;
             { { "FIRST", "C", 30, 0 },;
               { "LAST",  "C", 30, 0 } } )
   */

   USE ( hb_GetEnv( "PRGPATH" ) + "/data/menus.dbf" ) VIA "ADS"

   ? FieldName( 1 )
   ? FieldGet( 1 )
   ? RecCount()

   USE

return nil


resultado
Code (fw): Select all Collapse
NIL
0
DBFNTX
ADS
GLYPH
test
3
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: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: mod_harbour and ADS server
Posted: Mon Jun 15, 2020 05:08 AM
También funciona con diccionario de datos, instale en una maquina virtual con ads server

Code (fw): Select all Collapse
function Main()
    local hConnection, aIndex, cDbf, i

   RddRegister( "ADS", 1 )
    rddsetdefault( "ADS" )
    AdsSetFileType( 2 )
   AdsSetServerType( 2 ) // ADS_REMOTE_SERVER )
    AdsLocking( .t. )
    AdsRightsCheck( .f. )

    if AdsConnect60( "\\VM-VIRTUAL\SISTEMA\DATOS\WINFACTU.ADD", 2, "adssys", "pass",, @hConnection )
        aIndex := AdsDirectory()
        for i := 1 to len( aIndex )
            cDbf := Left( aIndex[i], len( aIndex[i] )-1 )
            ? cDbf
        next i
    else
        ? 'error al conectarse a la base de datos'
    endif

    AdsDisconnect(hConnection)

return nil

resultado

Code (fw): Select all Collapse
BODEGA
DOCU_BF
DBTODOS
CTACTE
DOCU_COD
DOCU_COT
DOCU_DPR
DOCU_FPP
DOCU_FP
CLIENTES
DOCU_ENT
ARTICU
DOCU_OC



archivo ads.ini
Code (fw): Select all Collapse
[SETTINGS]

RETRY_ADS_CONNECTS = 1 
DEFAULT_PROTOCOL=1
MTIER_LOCAL_CONNECTIONS=1

[VM-VIRTUAL]
LAN_IP=192.168.0.110
LAN_PORT=6262


espero que les sea de utilidad
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: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: mod_harbour and ADS server
Posted: Mon Jun 15, 2020 06:27 AM

Muy bien!

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion