Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

avoiding database erros

Status
Not open for further replies.

JKingdom

Programmer
May 9, 2004
141
AE
hi ..

is there an asp code that helps avoiding database errors ... for example : the database field type is integer .. so i get an error (Type mismatch)if i tried to enter string through the asp form .. so what i want is that (in case of a database error instead of displaying the error the code should take me to another asp page i created to warn the user about the error ) ..

thanks
 
or shall i use javascript code to validate the form before the data reaches the database ??
 
Best practice would be to use both clientside and server side validation.

Clientside javascript to catch the error for most cases (better performance since you dont waste trips back and forth to server while you resolve the problem). Serverside validation as a "catch all" for users with Javascript disabled.

Tony
[red]_________________________________________________________________[/red]
Webmaster -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top