Running ADS Without a Network


ADS is a remote database server. Consequently, you will almost always be running on some type of network, such as a standard file-server based network, a peer-to-peer network, an intranet, or the Internet.

Some developers, however, need to run ADS without a network present—for example, you may want to work with ADS from your laptop while on an airplane traveling to a client site. In a situation like this, your laptop is probably not connected to a network.

When you are not connected to a network, ADS will sometimes be unavailable. This is particularly true of machines running Windows operating systems. Specifically, unless a computer has been configured to do otherwise, a Windows machine will not load the IP stack when it is booting without a network present. The IP stack is required to communicate with ADS.

There are several solutions to this problem. The first solution is to simply use ALS when you are not connected to a network. Since ALS and ADS have the exact same API, you can use ALS to build applications that will be deployed using ADS. As mentioned earlier in this appendix, the only difference is that with ALS you cannot test transactions, nor can you test Java clients that use the Advantage JDBC Driver.

The next two solutions permit you to use ADS, but these require some configuration of your computer’s operating system. The first is to disable Window’s DHCP media sensing behavior, which in most cases permits the IP stack to be loaded whether or not a network is detected. The second is to install the Microsoft Loopback Adapter. We recommend trying the first technique, described in the next section. If that doesn’t work, try installing the Microsoft Loopback Adapter, described in the later section “Installing the Microsoft Loopback Adapter.”

While one or the other should work, we have encountered an instance that required us to perform both of these configurations. Also, we have found that these techniques do not work with Windows 98/ME machines. Those machines must be connected to a network, or you must use ALS.

Finally, regardless of which of these techniques you use, you might have to disable your firewall client. Client applications communicate with ADS over UDP port 6262 (by default) or TCP port 6262 (the default when using the Advantage JDBC Driver). If your firewall is blocking these ports, you will not be able to use ADS with the firewall active.

Disabling DHCP Media Sensing

In order to prevent Windows from testing for a network connection you need to make a small change to your Windows registry. Use the following steps to make this change:

  1. Select Run from the Start menu. Enter Regedit.exe in the Open field of the Run dialog box, and click OK to launch the Windows Registry Editor, shown in Figure A-1.

    click to expand
    Figure A-1: The Windows Registry Editor

  2. Select the HKEY_LOCAL_MACHINE root key in the Registry Editor.

  3. Make the following subkey the current key:

    SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
  4. Select Edit | New | DWORD Value from the Registry Editor’s main menu.

  5. Change the name of the new value to DisableDHCPMediaSense.

  6. Right-click the DisableDHCPMediaSense value and select Modify.

  7. Change the value to 1. Your screen should look something like that shown in Figure A-2.

    click to expand
    Figure A-2: The new entry in the Windows registry

  8. Now reboot your computer. ADS should now run normally, whether or not you are connected to a network.

Installing the Microsoft Loopback Adapter

Disabling Window’s DHCP media sensing is normally all you need to do to use ADS on a Windows machine that is not connected to a network. Another alternative, albeit one that is a little more involved, is to install the Microsoft Loopback Adapter. In our experience, we have come across only one laptop where the preceding steps failed (thereby requiring this step). If you cannot connect to ADS after making these registry changes, use the following steps to install the Microsoft Loopback Adapter.

Note

The steps given here are for Windows 2000. If you are using another operating system, the steps will be similar, though not identical. Use the displayed dialog boxes to get to the screen where you manually select hardware that you have already installed. From there, select to install a Network adapter, and when asked which one you want to install, select the Microsoft Loopback Adapter. You probably do not need your Windows installation disk handy, but it might be a good idea to have it available just in case.

  1. Open the Control Panel and launch the Add/Remove Hardware applet.

  2. From the Welcome screen, select Next.

  3. On the Choose a Hardware Task dialog box, leave the Add/Troubleshoot a device radio button enabled, and click Next.

  4. Windows will now search for hardware devices. Once this search is complete, you will see the Choose a Hardware Device dialog box.

  5. Select Add A New Device and click Next.

  6. From the Find New Hardware dialog box, select the No, I Want To Select A Hardware Item From A List Radio Button, and click Next.

  7. From the Hardware Type dialog box, select Network Adapters, and click Next.

  8. From the Select Network Adapter dialog box, set Manufacturers to Microsoft, and Network Adapter to Microsoft Loopback Adapter, as shown in Figure A-3. Select Next.

  9. From the Start Hardware Installation dialog box, select Next.

  10. From the Completed the Add/Remove Hardware Wizard dialog box, select Finish.

  11. Reboot your computer.

    click to expand
    Figure A-3: Selecting the Microsoft LoopAback Adapter




Advantage Database Server. The Official Guide
Advantage Database Server: The Official Guide
ISBN: 0072230843
EAN: 2147483647
Year: 2002
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net