all groups > sql server (alternate) > march 2004 >
You're in the

sql server (alternate)

group:

Verify email and website existance in SQL 2000


Verify email and website existance in SQL 2000 jensendarren NO[at]SPAM hotmail.com
3/30/2004 8:47:35 PM
sql server (alternate):
I am developing a database for a local business directory using SQL
2000 and I would like to be able, not only to validate email
addresses,
but also to verify that they actually exist. Is there a way to do this
in SQL 2000? I also want to do the same thing with website addresses
stored in the database.

Thank you in advance for any help.

Re: Verify email and website existance in SQL 2000 sql NO[at]SPAM hayes.ch
3/31/2004 3:38:41 AM
[quoted text, click to view]

First you would need to define what you mean by 'validate'. Do you
mean check the email address is a valid format as per RFC822, or do
you mean check that you can successfully send an email to that address
without it bouncing? Similarly, for URLs are you checking the format
of the string, or checking that there really is a web page there?

In the first case, a regular expression is probably the best solution,
although there seem to be several different opinions on what is the
best expression to use. In the second case, you would probably have to
send an email or an HTTP GET request, and parse the response (if any).

While you could do this in MSSQL with a combination of xp_sendmail and
the sp_OA% procedures, it would be far easier to use a language like
Perl, VB, C#, Python etc. which has good support for regexes, SMTP,
HTTP, text parsing etc. A pure SQL solution is likely to be very
awkward, and much slower.

AddThis Social Bookmark Button