dbWriter Home
IP to Country Look up
Site Map

IP to Country DB

Free Databases:

ASP Code

ASP Links

VB Script functions:
Array
Case/Select
In String (inStr)
Replace

HTML code:
SELECT Color
SELECT Countries
SELECT Language
SELECT State/Province

SQL:

SQL Functions:
Delete leading Char
Get Browser
Long number from IP

Stored Procedures:

SQL Tricks:
Delete ALL duplicates
Delete dup records

MISC
IP Address Owner
MS SQL Server

Mortgage Calcs:
how much is my payment
Loan Amortization
Loan Calculator
Mortgage Calculator
Motrgage Pay Off

dbWriter License

Link to US

Links

Contact US
 

dbWriter get flag SQL code

Note this code requires the dbWriter IPtoCountry database and the country database with flags

<%
CREATE PROCEDURE [dbo].[sp_GetFlag]
(
@Flag varchar(255) OUTPUT,
@USER_IP VARCHAR(20)
)

AS
DECLARE @LONG_IP BIGINT
DECLARE @C varchar(50)

SET @Flag = 'ERROR'

SET NOCOUNT ON

SET @USER_IP = RTRIM( LTRIM(@USER_IP))
SET @LONG_IP = [dbo].LONGFROMIP(@USER_IP)

SET @C = (SELECT Cntry from [dbo].tbl_IPTOCOUNTRY
WHERE ( @LONG_IP >= LONG_Start) AND (@LONG_IP <= LONG_END))


DECLARE @CCC varchar(50)
DECLARE @theCountry varchar(50)

SELECT @FLAG= flag, @CCC = C_ISO, @theCountry = Country
FROM [dbo].tbl_Countrys_ISO
WHERE ([dbo].tbl_Countrys_ISO.C_ISO = @C)
%>

Partners/Links © 2005 - 2008 dbWriter.com All Rights Reserved
This site is protected by the dbWriter IPtoCountry MS/SQL database!!
Site map | Link to US
Contact Us

Sign up for PayPal and start accepting credit card payments instantly.