mod_harbour and ADS server

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

mod_harbour and ADS server

Postby Taavi » Fri Apr 10, 2020 4: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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: mod_harbour and ADS server

Postby Taavi » Wed Apr 15, 2020 6: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.
Taavi
 
Posts: 89
Joined: Mon Nov 21, 2005 10:29 am

Re: mod_harbour and ADS server

Postby Antonio Linares » Thu Apr 16, 2020 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: mod_harbour and ADS server

Postby VitalJavier » Thu May 28, 2020 5:34 pm

Taavi
Podrias decirme cuales dll fueron los que pasaste

Gracias.
User avatar
VitalJavier
 
Posts: 241
Joined: Mon Jun 10, 2013 6:40 pm

Re: mod_harbour and ADS server

Postby Antonio Linares » Thu May 28, 2020 7:35 pm

regards, saludos

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

Re: mod_harbour and ADS server

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

Re: mod_harbour and ADS server

Postby Antonio Linares » Mon Jun 15, 2020 3:57 am

regards, saludos

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

Re: mod_harbour and ADS server

Postby Patricio Avalos Aguirre » Mon Jun 15, 2020 4: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: Select all  Expand view
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  Expand view
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: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: mod_harbour and ADS server

Postby Patricio Avalos Aguirre » Mon Jun 15, 2020 5:08 am

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

Code: Select all  Expand view
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  Expand view
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  Expand view
[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
Patricio Avalos Aguirre
 
Posts: 1060
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: mod_harbour and ADS server

Postby Antonio Linares » Mon Jun 15, 2020 6:27 am

Muy bien!
regards, saludos

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


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 17 guests

cron