Remote access solution

Post Reply
DougC43
Posts: 2
Joined: Mon Oct 30, 2006 10:18 pm
Location: Langley, BC Canada
Contact:

Remote access solution

Post by DougC43 »

Does anyone have good ideas for efficiently running the FiveWin/xHarbour/Advantage Database Server combination remotely? A new client of ours needs to have half a dozen people using our app. from different locations around the country, and we want to be able to recommend the most efficient solution right up front.

Our app is designed so that it must be in the same folder as the data, so without a lot of modification, it's not practical to have it resident on the workstation; it must remain on the server.

Thanks!
Doug
ShumingWang
Posts: 454
Joined: Sun Oct 30, 2005 6:37 am
Location: Guangzhou(Canton),China

Post by ShumingWang »

[x]harbour+fwh+tmysql+mysql works geate!
Only need tmysql.prg,mysql.c,libmysql.lib ( import from libmysql.dll from mysql) link to your exe.
At runtime , only need a libmysql.dll .


http://www.xtech.com.cn/down/tmysql.prg
http://www.xtech.com.cn/down/sample1.prg
http://www.xtech.com.cn/down/sample2.prg

Regards!

Shuming Wang
User avatar
Luis Krause
Posts: 59
Joined: Tue Oct 11, 2005 1:39 am
Location: Vancouver, Canada

Post by Luis Krause »

Shuming:
ShumingWang wrote:[x]harbour+fwh+tmysql+mysql works geate!
I think Doug is currently using ADS, so he want to know how to use Advantage Internet Server to extend his current system. I've only used
Remote Server so maybe someone that has use AIS can chime in as of how to use it, even a sample.
"May the Source be with GNU"
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

That's my area of expertise:

AIS (Advantage Internet Server) is a little complicate to understand but it works the way you want, what you need is:

1) a Data dictionary to validate the remote users (See the ARC manual to do this), you have to setup new users, and your tables within the same dictionary, you have also to enable internet access to both, dictionary and users.

2) In the advantage configuration utility you have to assign a port for the internet server and a compresion of the data, do so in your server.

3) You have to open and forward the same port established in the previous step in your router to your internal server.

4) In your code, you have to set the server type to 7, this way the same application will run in your LAN or in internet, depending of the first available server (AdsSetServerType(7)).

5) In your code, you have to connect to the remote server using the AdsConnect60() function, passing this parameters:

AdsConnect60("\\server\share\folder\dictionary.add",7,"user","password")

please notice that you have to connect to the dictionary using the UNC, thi s UNC will be solved in the next step.

6) In you code, remove the reference to the path when opening databases, once you have registered the table in the dictionary, you not longer need the path to open.

7 ) How does ADS knows where is the server, or who ADS knows that the server is running over internet ?, very easy, ADS uses a configuration file called ADS.INI that must exist in the same directory where the AXCWS32.DLL is, this ADS.INI file looks like this

[server]
INTERNET_IP= 200.67.37.111
INTERNET_PORT=whatever.

the entry "server" is where the ADS must look for the public IP, so any reference in your code inthe URL for \\server will point to the internet server.

Example:

In you code:

AdsConnect60("\\server\cursos\adsdemo\stc\dic.add",7,"demo","demo")

In the ADS.INI

[googleserver]
INTERNET_IP=google.d2g.com
INTERNET_PORT=2000

Please check samples of AIS

Don't hesitate on contactme to my private mail if you want further information.
Saludos
R.F.
DougC43
Posts: 2
Joined: Mon Oct 30, 2006 10:18 pm
Location: Langley, BC Canada
Contact:

Post by DougC43 »

Hi, Rene,
Thank you for your very comprehensive reply. This will take some time to digest, but I expect I will be in touch with you later with other questions that come up as we try to implement this solution.
Post Reply