//////////////////
// TestCli.Prg -- Program client (this file)--
//
//
// Notes:
//
// \hb32 is harbour dir
// \hb32\bin\hbNetIO.Exe is server NetIO
// c:\data is dir data. It must contains Test.Dbf
//
//
// Testing hbNetIO Server from harbour. Steps:
//
// 1st) Mk c:\data
// 2nd) In \hb32\bin run hbnetio so: hbnetio -rootdir=c:\data
// 3rd) Compile, build, run and fun testcli.prg
//
////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------//
FUNCTION Main()
Local oerr
#define DBSERVER "127.0.0.1"
#define DBPORT 2941
#define DBDIR "Data"
#define DBFILE "Test"
#define DBNAME "net:"+ DBFILE
request DBFCDX, DBFFPT
set exclusive off
rddsetdefault("DBFCDX")
netio_connect( DBSERVER, hb_ntos(DBPORT))
try
use (DBNAME)
? "conexion ok !", fieldname(1), fieldget(1)
catch oerr
? "conexion error", oerr:description+ CRLF+ oErr:operation+ CRLF+ oErr:FileName
end
return
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 103 guests