Postcode Lite Software providing Royal mail PAF data

Programmers SDK : Get Street Level Address

The following explains how to retrieve a Street Level address.

Function : GetStreetAddress(Postcode as string, DataKey as string, Location as string,  Parms as string) as string

Parameter Description
Postcode Postcode you are trying to find
DataKey For Internet based data, use your data key, assigned when you opened an account.

When Postcode Lite is used within an organisation use the data key beginning with "I", and buy User licenses to access the data.
When supplying the address data to the general public, on a web site, use the data key beginning with "W" and purchase Web Credit Packs.


Location For Local Data, specify the location of the data files.
For example "C:\MyApp".  The correct license is assigned as part of the unlock process when using local data.
Parms This is for future expansion

Returns:

This function returns true if search returned valid data, else .General_errormessage will contain the error, and .General_credits_display_text if problem with license.

This PostCodeLite Object contains the following properties:

Property Description
General_errormessage Error Message if error
General_credits_display_text Number of Credits/Users available
Address_Line1
Address_Line2
Address_Line3
Address_Town
Address_County
Address_Postcode
Address_Country
Address_Line1 may return road name, but the user must be prompted for Building name or number

Example code : Visual Basic :

Dim PostCodeLite As Object, ReturnedData as string

 

Set PostCodeLite = CreateObject("IPostCodeLite.PostCode")

 

if PostCodeLite.GetStreetAddress("PE132QL","I_HDI7...HU7ID","","")  then    

    Dim DataToShow$
    DataToShow = "Data Returned : " & vbCrLf
    DataToShow = DataToShow & " Status : " & .General_credits_display_text & vbCrLf
    DataToShow = DataToShow & " accountadminpage : " & .General_accountadminpage & vbCrLf
    DataToShow = DataToShow & "" & vbCrLf
    DataToShow = DataToShow & " line1 : " & .Address_Line1 & vbCrLf
    DataToShow = DataToShow & " line2 : " & .Address_Line2 & vbCrLf
    DataToShow = DataToShow & " line3 : " & .Address_Line3 & vbCrLf
    DataToShow = DataToShow & " town : " & .Address_Town & vbCrLf
    DataToShow = DataToShow & " county : " & .Address_County & vbCrLf
    DataToShow = DataToShow & " postcode : " & .Address_Postcode & vbCrLf
    DataToShow = DataToShow & " country : " & .Address_Country & vbCrLf
    msgbox DataToShow

else
    If .General_errormessage <> "" Then

       'Show/Handle any errors
       MsgBox .General_credits_display_text & vbCrLf & .General_errormessage, _

                    vbCritical, "Postcode Lite"
    Else
       MsgBox "Not found!"
    End If

end if

Set PostCodeLite = Nothing

 

 
 
Postcode Lite is brought to you by ComTek Accounts Ltd