// Open the QAS object iResult=""; iCode = objQAddress.Open("QAProWeb","QADefault"); // Get any status code from QAS - see QAS manual for descriptions of codes qasStatus1 = objQAddress.ErrorMessage(iCode); //Depending on whether this was a postcode or street/town search do correct one iCode1 = objQAddress.Search("#SearchString#"); // Again get status variable on the search qasStatus2 = objQAddress.ErrorMessage(iCode); // Set variable to number of results returned iResultCount = objQAddress.ResultsCount - 1; sEncodedAddress = ""; // Get the 'Preview' Address iCount=0; sPreviewAddress = objQAddress.Preview(iCount); // Get the actual full address value sAddCount=0; //line below is the version for one property only //sAddress=objQAddress.Address(0); //this loops through the properties and extracts each one. for(iLine=1; iLine LTE (iResultCount+1); iLine=iLine+1) {sAddress[iLine] = objQAddress.Address(iLine-1); } objQAddress.Close(); [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => jakp [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Postcode validation UK (QAS) - Coldfusion - Advanced Techniques

Postcode validation UK (QAS) - Coldfusion - Advanced Techniques

We're trying to do exactly the same thing - and I can't seem to find any info either. Have you had any luck yet?...

  1. #1

    Default Re: Postcode validation UK (QAS)

    We're trying to do exactly the same thing - and I can't seem to find any info either. Have you had any luck yet?
    Superbreak Guest

  2. #2

    Default Re: Postcode validation UK (QAS)

    Yes, have managed to do it. Unfortunately am having problems posting to this forum. If you send me a PM with your email address I will email details on to you.
    jakp Guest

  3. #3

    Default Re: Postcode validation UK (QAS)

    Okay, I seem to be able to post again now.

    Here's the code I used. Any questions probably best asked in this forum then I
    can answer for everyone.

    Note that my search string is made up of "(house name or number), (postcode)".
    I don't allow anything else. You can obviously tweak to suit.

    Code works (for me) without a hitch on Win2K platform but experience
    intermittent errors giving rise to "API not initialised" error code from QAS on
    Win2003 platform. Currently investigating this - seems to occur overnight only
    and is got rid of by bouncing the server. At the moment it's only an
    inconvenience. Therefore think that relates to the server, rather than the code.

    Note also with Win2003 you MUST close the object at the end : Win2K is more
    forgiving and seems not to mind if you miss that line out.

    <CFTRY>
    <CFOBJECT ACTION="CONNECT" CLASS="QAProWeb.QAProWeb.1" NAME="objQAddress"
    TYPE="COM">
    <CFCATCH>
    <CFOBJECT ACTION="CREATE" CLASS="QAProWeb.QAProWeb.1"
    NAME="objQAddress" TYPE="COM">
    </CFCATCH>
    </CFTRY>
    <!--- Now do the search based on the search terms sent to us in the FORM
    variables above --->
    <cfscript>
    // Open the QAS object
    iResult="";
    iCode = objQAddress.Open("QAProWeb","QADefault");
    // Get any status code from QAS - see QAS manual for descriptions of codes
    qasStatus1 = objQAddress.ErrorMessage(iCode);
    //Depending on whether this was a postcode or street/town search do correct
    one
    iCode1 = objQAddress.Search("#SearchString#");
    // Again get status variable on the search
    qasStatus2 = objQAddress.ErrorMessage(iCode);
    // Set variable to number of results returned
    iResultCount = objQAddress.ResultsCount - 1;
    sEncodedAddress = "";
    // Get the 'Preview' Address
    iCount=0;
    sPreviewAddress = objQAddress.Preview(iCount);
    // Get the actual full address value
    sAddCount=0;
    //line below is the version for one property only
    //sAddress=objQAddress.Address(0);
    //this loops through the properties and extracts each one.
    for(iLine=1; iLine LTE (iResultCount+1); iLine=iLine+1)
    {sAddress[iLine] = objQAddress.Address(iLine-1); }
    objQAddress.Close();
    </cfscript>

    jakp Guest

Similar Threads

  1. UK Postcode data?
    By ninjafoo in forum PHP Development
    Replies: 3
    Last Post: March 18th, 07:55 PM
  2. postcode system help
    By mark | r in forum ASP
    Replies: 0
    Last Post: July 15th, 04:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •