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
 

SQL @@ERROR

Syntax  @@ERROR  returns  integer

Execution of a Transact-SQL statement, @@ERROR is set to 0 if the statement executed successfully.

RETURN an integer that represents the error. IF an error occurs, I typically use a negative integer to represent errors or problems that have occurred when working with a SQL database.

Because @@ERROR is cleared and reset on each statement executed, check it immediately following the statement validated, or save it to a local variable that can be checked later.

 

-- Execute the INSERT, UPDATE  or DELETE statement.
INSERT INTO authors
(au_id,  au_lname, au_fname, phone, address,
 city, state, zip, contract) values
(@au_id,@au_lname,@au_fname,@phone,@address,
 @city,@state,@zip,@contract)


-- Test the error value.
IF @@ERROR <> 0
BEGIN
    RETURN(-100)  -- return a integer that represents the error location in your code.
END
ELSE
BEGIN
    RETURN(0)
END
GO
 


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.