Hi,
I came across this code example in the Xbase 1.90.355 documentation of the USE command.
PROCEDURE Main
LOCAL oSession
oSession := DacSession():New("DBE=ADSDBE;SERVER=\\ALASKA01\VOL1")
USE "\\ALASKA01\VOL1\Customer" SHARED VIA (oSession)
RETURN
I have tried opening a table on an Advantage server using the same approach. I am setting up a web server and I am trying to avoid using a drive letter (which works) on the advice of the network security technicians since according to them it creates a vulnerability. I would like to be able to use the form USE \\servername\path\tablename but I am getting the error message Error Base\0 Dbusearea.
I have also tried SET DEFAULT TO \\servername\path but this does not work.
Does anyone have any experience with using a UNC path in this way?
S Lorde
Using UNC path to open files
Re: Using UNC path to open files
UNC-pathes work well, even with SET PATH or Set(_SET_PATH). Try this:
or this
Code: Select all
USE ("\\ALASKA01\VOL1\Customer") SHARED VIA (oSession)
Code: Select all
cFile := "\\ALASKA01\VOL1\Customer"
USE (cFile) SHARED VIA oSession
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Using UNC path to open files
You may also need to explicitly specify the port, default of 6262.
\\servername:6262\volumename.
We have do do that for instances of connections between our local office, central wisconsin and our Chicago IL web servers.
\\servername:6262\volumename.
We have do do that for instances of connections between our local office, central wisconsin and our Chicago IL web servers.
Re: Using UNC path to open files
I made the code changes as suggested. The file opened only when the port was specified. Additionally, apparently because of how the network is setup, I had to use the server IP address instead of the name of the server in the path. At least it worked. Thanks a lot guys.
S Lorde
S Lorde
Re: Using UNC path to open files
Create an ADS.INI if possible to a) improve performance while detecting the server and b) avoid adress conflicts.
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: Using UNC path to open files
The configuration of my standard program version uses the Ads.ini file in which the server IP is specified. I will experiment with other settings for this file in the web version to see what is possible given the network architecture that I have been given. Thanks, Tom.
S Lorde
S Lorde