I just correct the way that i call the name of database on create

and this solve the problem .

How is the correct way to create an index database and check if exist

using netio ?

Thanks and this is a great work

Bruno



2010/4/18 Bruno Luciani <bruno.luci...@gmail.com>

> Przemyslaw
>
> I just add Hbnetio to my sample aplicattion and all works ok
>
> after , I change this
>
> pSockSrv := netio_mtserver( DBPORT,,, /* RPC */ .T., DBPASSWD )
>
> In your sample DBPORT is a numeric data , but I need to put it in an string
> format to work ok
>
> But the only think that I can't make to work it is DBcreate , the program
> still create database in his own folder
>
> instead data server folder , what do you think I am doing wrong ?
>
> this is my prg code to create database
>
> ////////////////////////////////////////////////////////////////////
>
> #define DBSERVER  "127.0.0.1"
> #define DBPORT    2941
> #define DBPASSWD  "topsecret"
> #define DEMOTITLE "Multiplatform Demo System"
> #define DBFILE    "clients"
> #define DBDIR     "data"
> #define DBNAME    "net:" + DBSERVER + ":" + hb_ntos( DBPORT ) + ":" + ;
>                   DBPASSWD + ":" + DBDIR + "/" + DBFILE
> request HB_DIREXISTS
> request MAKEDIR
>
>
>
> ////////////////////////////////////////////aStruct contains database
> structure and aData , sample data for demo////////////////////////
>
> if !dbExists("clients")
>
>   dbCreate("clients", aStruct )
>
>   use (DBNAME)
>
>   for x:=1 to 4
>   clients->(dbappend())
>     clients->codigo:=aData[x,1]
>     clients->nombre:=aData[x,2]
>     clients->telefono:=aData[x,3]
>     clients->direccion:=aData[x,4]
>     clients->ciudad:=aData[x,5]
>     clients->fecha:=aData[x,6]
>   clients->(dbcommit())
>   next
>
>   close clients
>
> endif
>
> /////////////////////////////////////////////////////////
>
>
> thanks in advance for your help
>
> Bruno
>
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to