Ads connection without drive mapping

Post Reply
User avatar
Nop
Posts: 107
Joined: Tue Apr 11, 2006 4:36 pm
Location: Uberaba/Brazil

Ads connection without drive mapping

Post by Nop »

hi, to use this (above, subject), i need use data dictonary? adt proprietary files? someone has an sample? thanks
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

Nop:

In your source code add:

AdsRightsCheck(.F.)

And open you database using the UNC notation:

USE \\servername\share\folder\dbf.

Sample:

USE \\googleserver\samples\adsdemos\customer.dbf

and, you need a .INI file, ADS.INI file with the following section:

[server]
LAN_IP= xxx.xxx.xxx.xxx
LAN_PORT= xx

Sample:

[googleserver]
LAN_IP=192.168.2.1
LAN_PORT= 2000

Please notice that hidding directories feature is only available with Remote and Internet Servers.
Saludos
R.F.
User avatar
Nop
Posts: 107
Joined: Tue Apr 11, 2006 4:36 pm
Location: Uberaba/Brazil

Post by Nop »

Rene, thanks. what´s hidding directory?? ads ou windows function?
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

Nop:

Hidding directories is a feature of ADS, this feature means that you don't have to share the data directories in your server in order to have full access to them via ADS.

In Xbase normally in order to have full access to your DBF data you need to share and give full access to the user (read and write), so, in your workstation the user can see the directory with the data, he can copy it, edit it with external tools, etc.

With ADS you don't need to share the folder with the data in the server because ADS is installed in the server and it works as the only authorized user to access the data.

Any way, you have to override the user rights to the directory, this is done with the AdsRightsCheck(.f.) function, with this function the ADS client program skips the security features of the server and have full access to the data.
Saludos
R.F.
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Post by norberto »

Rene, works fine here, thanks

more one question: i dont need use VIA [dbfcdxax]?? if i put this clause an error is made.

this works:
USE \\srv_pdc\srv_app\Videfarm\cadasco.dat
browse()

but this no works
USE \\srv_pdc\srv_app\Videfarm\cadasco.dat VIA .....
browse()

and to open the index? use the same way?

i need share the directory or not?

very thans

(i use ads server and local to tests)

norberto
norberto
Posts: 566
Joined: Thu Aug 30, 2007 3:40 pm
Location: BR

Post by norberto »

Rene, one more (sorry), and to use set default to ...., if i use unc notation in this clause , works? thanks
Post Reply