| |
CorrectAddress® SQL Server 2000 SDK
CorrectAddress comes with Microsoft SQL-Server
Software Developer’s Kit that includes a specialized dynamic link
library and several examples on creating Transact-SQL (T-SQL) wrapper scripts
that reference SQL Server extended stored procedures.
CorrectAddress functions can be called from any T-SQL scripts as soon as
corresponding extended stored procedures are registered with SQL-Server.
Here is a simple example of registering such a procedure with the dynamic
link library provided.
• Open Microsoft SQL Server Enterprise Manager
• Connect to the server that you will be using
•
Open DATABASES folder and go to the ‘master’ database
• Right-click on EXTENDED STORED PROCEDURES
• Click on NEW EXTENDED STORED PROCEDURE
•
In the ‘Name’ field, type xp_CorrectA
•
In the ‘Path’ field, type the path to your CorrectAddress DLL
•
Click ‘OK’
This will allow one of CorrectAddress main processing units (CorrectA
function) to be called from SQL-Server’s T-SQL scripts.
EXAMPLE OF CALLING a CorrectAddress function FROM MS-SQL:
exec dbo.xp_CorrectA @inputAddress , @sentLen, @errcode OUTPUT, @firmname
OUTPUT, @urbanization OUTPUT, @dline1 OUTPUT, @dline2 OUTPUT, @lastline
OUTPUT,@DPC OUTPUT, @Checkdigit OUTPUT, @cityname OUTPUT, @stcode OUTPUT,
@zip OUTPUT, @addon OUTPUT,@croute OUTPUT, @LACS OUTPUT, @LOTsequence OUTPUT,
@LOTcode OUTPUT, @PMB OUTPUT, @results OUTPUT, @strnum OUTPUT, @secname
OUTPUT, @secnum OUTPUT, @countyname OUTPUT, @countynum OUTPUT, @retcode
OUTPUT
SAMPLE INPUT/OUTPUT:
Input address:
20 Milltewn Rood #202
Brwester NY
Output address:
20 MILLTOWN RD STE 202
BREWSTER, NY 10509-4345
CorrectAddress® General Information
|
|