[SPA]
Hola,
¿Cómo puedo recuperar los valores de un archivo Memo con NetIO?
Estuve jugando con netiot02.prg, pero obtengo este error:
[ENG]
Hi,
How can I retrieve values from a file memo with NetIO"?
I was playing with netiot02.prg, but get this error:
===========================================
D:\harbour\contrib\hbnetio\tests>netiot02
CONNECTING...
NETIO_CONNECT(): .F.
DATE() function is supported: .T.
QOUT() function is supported: .T.
HB_DATETIME() function is supported: .T.
DIRECTORY() function is supported: .T.
RESTORE FROM (__MVRestore()) function is supported: .T.
Archivo memo exists: .T.
Error BASE/1003 Variable does not exist: VM_POPE
Called from MAIN(80)
D:\harbour\contrib\hbnetio\tests>VM_POPE
=================================================
[SPA]
¿Porqué NETIO_CONNECT() siempre devuelve .F.?
El código fuente modificado es este:
[ENG]
Why NETIO_CONNECT () always returns. F.?
The modified source code is this:
------------------------------------------------------------------
/*
* $Id: netiot02.prg 13542 2010-01-12 15:46:03Z vszakats $
*/
/*
* Harbour Project source code:
* demonstration/test code for RPC in NETIO
*
* Copyright 2010 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
* www - http://www.harbour-project.org
*
*/
/* to execute this code run server (netiosrv) on the same machine
* with support for RPC and "topsecret" password, i.e.:
* netiosrv "" "" "" 1 topsecret
* then you can try to execute this code.
* If you want to execute remotely any core functions then
* uncomment this like in netiosrv.prg:
* REQUEST __HB_EXTERN__
* and rebuild it or link netiosrv with Harbour dynamic library
* (-shared hbmk2 switch)
*/
/* few PP rules which allow to execute RPC function using
* pseudo object 'net', i.e. ? net:date()
*/
#xtranslate net:<!func!>([<params,...>]) => ;
netio_funcexec( #<func> [,<params>] )
#xtranslate net:[<server>]:<!func!>([<params,...>]) => ;
netio_funcexec( [ #<server> + ] ":" + #<func> [,<params>] )
#xtranslate net:[<server>]:<port>:<!func!>([<params,...>]) => ;
netio_funcexec( [ #<server> + ] ":" + #<port> + ":" + #<func> ;
[,<params>] )
#xtranslate net:exists:<!func!> => ;
netio_procexists( #<func> )
#xtranslate net:exists:[<server>]:<!func!> => ;
netio_procexists( [ #<server> + ] ":" + #<func> )
#xtranslate net:exists:[<server>]:<port>:<!func!> => ;
netio_procexists( [ #<server> + ] ":" + #<port> + ":" +
#<func> )
/* address of computer executing netiosrv,
* change it if it's not the same machine
*/
#define NETSERVER "127.0.0.1"
#define NETPORT 2941
#define NETPASSWD "topsecret"
#define DBMEMO "net:" + NETSERVER + ":" + hb_ntos( NETPORT ) + ":" + ;
NETPASSWD + ":" + "Memo.GVS"
proc main()
SET DATE ANSI
SET CENTURY ON
/* connect to the server */
? "CONNECTING..."
? "NETIO_CONNECT():", netio_connect( NETSERVER, NETPORT,, NETPASSWD )
?
/* check if some function are available on server side */
? "DATE() function is supported:", net:exists:DATE
? "QOUT() function is supported:", net:exists:QOUT
? "HB_DATETIME() function is supported:", net:exists:HB_DATETIME
? "DIRECTORY() function is supported:", net:exists:DIRECTORY
? "RESTORE FROM (__MVRestore()) function is supported:",
net:exists:__MVRestore
?
/* display text on server console */
net:QOUT( repl( "=", 70 ) )
net:QOUT( "This is RPC TEST", hb_datetime(), version(), date(), time() )
net:QOUT( repl( "=", 70 ) )
? "Archivo memo exists:", net:dbExists( "Memo.GVS" )
*
net:__MVRestore( "Memo.GVS" , .T.)
? VM_POPE, VM_CANO
*
/* execute some functions on the server side and display the results */
? "SERVER DATE:", net:DATE()
? "SERVER TIME:", net:TIME()
? "SERVER DATETIME:", net:HB_DATETIME()
? "LEN(aDir):", LEN(net:DIRECTORY("*.*"))
? "LEN(aDir):", net:DIRECTORY("*.*")[4,1]
? "LEN(aDir):", net:DIRECTORY("*.*")[5,1]
? net:upper( "hello world !!!" )
?
/* close the connection to the server */
? "NETIO_DISCONNECT():", netio_disconnect( NETSERVER, NETPORT )
return
--------------------------------------------------------
Any Help/TIP?
TIA
BestRegards
GVS
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour