Acces of a file with IP Adress

Post Reply
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Acces of a file with IP Adress

Post by Jack »

It is possible to do this :
select 0
use \\192.168.10.3\DATA\XYZ.DBF

How to establish the connection to the server (user name and password) if there is not network letter already mapped ??
Thanks .
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Post by Jack »

Thanks for this answer .
I dont want to use a drive letter because i dont want the user to be able
to explore the network drive .
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Jack

UNC paths work just fine .. however i would be careful in a WAN environment .. just too many things can happen over long distances .. users still need share rights to your databases ..

I use \\server\volume\folder\table.dbf ... all the time and you can set defa to a unc as well and then just select as usual.

Rick Lipkin
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Post by Jack »

Rick,
Thanks for your help .
How to have access to the server (how to log) before the use of the Unc.
I dont want that the user have access to the network drive with explorer .

Thanks
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Post by Rick Lipkin »

Jack

I agree with you .. I have used UNC access for just that reason .. I don't want people running thru a mapped drive with Explorer to get to my application just to open the tables in Excel and really mess things up.

You can use either a DNS name like :

use (\\myserver\volume\folder\table.dbf)

or

use ( \\10.1.10.111\volume\folder\table.dbf )

Again .. users will need full rights to the application folder, but it does not need to be mapped.

Rick Lipkin
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Post by Jack »

Rick,
Thanks for your help,
it works fine .
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Acces of a file with IP Adress

Post by Otto »

Hello Rick,
use (\\myserver\volume\folder\table.dbf)
or
use ( \\10.1.10.111\volume\folder\table.dbf )
Could you show how to pass user and password?

Thanks in advance
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Acces of a file with IP Adress

Post by Rick Lipkin »

Otto

Your user will need prior authendication rights given to them from their Network Admin .. once they have folder permisions the UNC will work fine .. no userid or password is necessary.

This will even work and span servers as long as the proper user permissions are set

\\server1\volume\folder\table.dbf
\\server2\volume\folder\table.dbf

As long as the user has permissions to the above folder on either server ..

select 0
use( "\\server1\volume\folder\table.dbf") via DBFCDX shared

or

select 0
use( "\\server2\volume\folder\table.dbf") via DBFCDX shared

will work.

If you know the server1 or server2 IP address .. you can substitute the address for the server name

Server1 IP is 10.1.34.40
Server2 IP is 10.1.34.41

select 0
use( "\\10.1.34.40\volume\folder\table.dbf") via DBFCDX shared

or

select 0
use( "\\10.1.34.41\volume\folder\table.dbf") via DBFCDX shared

Everything I have said here assumes the above server(s) are within the same organization and firewall .. anything outside of that you will need a different strategy.

Hope that helps ..

Rick Lipkin
Sheng
Posts: 15
Joined: Mon Sep 29, 2008 1:41 pm

Re: Acces of a file with IP Adress

Post by Sheng »

new Harbour 2.0beta3 support it!!
NETIO_CONNECT( "192.168.0.1" )
use net:table1
NETIO_CONNECT( "192.168.0.2" )
use net:table2
use net:192.168.0.3:table3
Post Reply