Click here to Skip to main content
15,892,746 members
Articles / Programming Languages / VBScript

Implement Phonetic ("Sounds-like") Name Searches with Double Metaphone Part II: Visual Basic and Relational Database Solutions

Rate me:
Please Sign up or sign in to vote.
4.79/5 (15 votes)
19 Mar 200711 min read 147.7K   4.1K   38  
Describes the COM wrapper around the author's C++ implementation of Double Metaphone, and demonstrates use of this COM wrapper within Visual Basic to phonetically search a list of names, as well as names in a database table.
=========================================================================
    EXTENDED STORED PROCEDURE : XPMetaphone Project Overview
========================================================================


AppWizard has created XPMetaphone.dll for you.  

This file contains a summary of what you will find in each of the files that
make up your XPMetaphone application.

XPMetaphone.vcproj
    This is the main project file for VC++ projects generated using an Application Wizard. 
    It contains information about the version of Visual C++ that generated the file, and 
    information about the platforms, configurations, and project features selected with the
    Application Wizard.

XPMetaphone.cpp
    This is the main dll source file.

proc.cpp
    This file contains the stored procedure xp_metaphone

/////////////////////////////////////////////////////////////////////////////
Other standard files:

StdAfx.h, StdAfx.cpp
    These files are used to build a precompiled header (PCH) file
    named XPMetaphone.pch and a precompiled types file named StdAfx.obj.


/////////////////////////////////////////////////////////////////////////////
Other notes:

After completing this Wizard, copy the XPMetaphone.dll over to your SQL Server 
\Binn directory.

Add your new Extended Stored Procedure from a Visual Studio Data Project, 
or using the SQL Server Enterprise Manager, or by executing the following 
SQL command:
  sp_addextendedproc 'xp_metaphone', 'XPMetaphone.DLL'

You may drop the extended stored procedure by using the SQL command:
  sp_dropextendedproc 'xp_metaphone'

You may release the DLL from the Server (to delete or replace the file), by 
using the SQL command:
  DBCC xp_metaphone(FREE)


/////////////////////////////////////////////////////////////////////////////

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
My name is Adam Nelson. I've been a professional programmer since 1996, working on everything from database development, early first-generation web applications, modern n-tier distributed apps, high-performance wireless security tools, to my last job as a Senior Consultant at BearingPoint posted in Baghdad, Iraq training Iraqi developers in the wonders of C# and ASP.NET. I am currently an Engineering Director at Dell.

I have a wide range of skills and interests, including cryptography, image processing, computational linguistics, military history, 3D graphics, database optimization, and mathematics, to name a few.

Comments and Discussions