mod_harbour and ADS server

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
Post Reply
Taavi
Posts: 77
Joined: Mon Nov 21, 2005 10:29 am

mod_harbour and ADS server

Post by Taavi »

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.
Taavi
Posts: 77
Joined: Mon Nov 21, 2005 10:29 am

Re: mod_harbour and ADS server

Post by Taavi »

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.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: mod_harbour and ADS server

Post by Antonio Linares »

Glad to know that mod_harbour is working fine as expected.

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

Antonio Linares
www.fivetechsoft.com
VitalJavier
Posts: 188
Joined: Mon Jun 10, 2013 6:40 pm

Re: mod_harbour and ADS server

Post by VitalJavier »

Taavi
Podrias decirme cuales dll fueron los que pasaste

Gracias.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: mod_harbour and ADS server

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Patricio Avalos Aguirre
Posts: 1028
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile
Contact:

Re: mod_harbour and ADS server

Post by Patricio Avalos Aguirre »

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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: mod_harbour and ADS server

Post by Antonio Linares »

Patricio,

Comprueba que estés usando esta versión:

https://github.com/FiveTechSoft/mod_har ... _05_27.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Patricio Avalos Aguirre
Posts: 1028
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile
Contact:

Re: mod_harbour and ADS server

Post by Patricio Avalos Aguirre »

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: Select all

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: Select all

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
User avatar
Patricio Avalos Aguirre
Posts: 1028
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile
Contact:

Re: mod_harbour and ADS server

Post by Patricio Avalos Aguirre »

También funciona con diccionario de datos, instale en una maquina virtual con ads server

Code: Select all

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: Select all

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: Select all

[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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: mod_harbour and ADS server

Post by Antonio Linares »

Muy bien!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply