Nearcode

 

Example Name:                              NCD

 

Language:                                       C#

 

API type:                                           ActiveX

 

API component filename:            ZcClicon.dll

 

Environment:                                  Windows 2000, XP, Vista, (Using Visual Studio 2008, .Net Framework 3.5) 

 

 

What does it do?

 

Demonstrates the use of Nearcode client API. It connects to the Nearcode Pool Manager and queries the server via a user entered search string therefore allowing the user to familiarise themselves with the fields returned by the server. It specifically demonstrates the process of a nearestrecords lookup using psearch.

 

 

Could be used as a starting point for:

 

Learning about Nearcode and as sample API code, specifically connecting to Nearcode Pool Manager and performing a search.

 

 

Where to find the example code:

 

After running the setup from the Nearcode CD to install the client APIs you will find these examples installed (by default) in:

 

C:\Program Files\Capscan\SDK\>nearcode Client API\ActiveX\Examples\CS

 

If you have installed to another location you will need to change the path where necessary.

 

 

What each file does:

 

File name                                         What does it do?

 

AmbiguityForm.cs                              Form used to present and resolve ambiguous results.

 

ConnectionForm.cs                        Form used to select the server running the Capscan Pool                  Manager and to select the required pool.

 

InfoForm.cs                                          Form used to display the pool information and available fields.

 

NearcodeForm.cs                              The main form for searching and displaying the results.

 

ZcClicon.Interop.dll                             You need to add a reference to this file if you are going to be calling the ActiveX from a .net application.

 

NCD.sln                                     Visual Studio 2008 solutions file.                              

 

Program.cs                              The main entry point for the application.                 

 

 

Preparing to run the example:

 

Please make sure that you have installed the Nearcode Server and that it is up and running.

 

You will need to register the ActiveX control before you can use it.  To do this:

 

1.       Open a command prompt in the same folder as ZcClicon.dll.

 

2.       At the prompt type in the following and press enter:

 

        regsvr32 ZcClicon.dll

 

 

Running the example:

 

1.       Make sure that the API library is in the search path.

 

2.       Open the NCD.sln solution file using Visual Studio 2008.

 

3.       In the solution Explorer, under References, make sure that there is a valid entry for the ZcClicon.Interop.dll.

 

4.       Make sure that the Solution Configuration is set to Debug.

 

5.       Press F5 to run the example.

 

6.       From the Connection window select the connection type, host server name (and for OnDemand, you account details) and pool and click OK.

7.     Once you have connected to the Capscan Pool Manager you will presented with the main window where you can enter the search details.

  8.     Enter a postcode or town name in the Search field and then click the search button. 

 

 

Trouble-shooting and hints:

 

1.      If you are running on a LAN make sure that the Capscan Pool Manager is running correctly.  To do this you can use the PoolMan Admin application that is installed along with the Capscan Pool Manager.

 2.    If you are using a firewall make sure that it is not blocking this example or the Capscan Pool Manager.  By default the Capscan Client/Server uses port 27920 for sending and receiving data.

 3.   For more hints and tips please see the SDK bookshelf documentation.