Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Error Handling
Hi,
Assume that I have two insert statements (in SP) that both of them can
conflict with two different constraints(e.g. PK and CHECK).
I have added a customized error to sysmessages but SQL Server returns the
error immediately as any of insert statements conflicts.
How can I handle this error and return my own error message to client?
Thanks in advance,
Leila



Report this thread to moderator Post Follow-up to this message
Old Post
Leila
05-29-05 08:23 AM


Re: Error Handling
Hi

There is not enough information to give you a full answer as this will
depend on what you client program is written in, for example for ADO.NET
check out http://www.sommarskog.se/error-handling-I.html#ADO.Net

These are a good foundation in error handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html

Posting DDL and example data will also help if you have a specific problem
http://www.aspfaq.com/etiquett_e.asp?id=5006


John

"Leila" <leilas@hotpop.com> wrote in message
news:%23ayyVNCZFHA.3280@TK2MSFTNGP09.phx.gbl...
> Hi,
> Assume that I have two insert statements (in SP) that both of them can
> conflict with two different constraints(e.g. PK and CHECK).
> I have added a customized error to sysmessages but SQL Server returns the
> error immediately as any of insert statements conflicts.
> How can I handle this error and return my own error message to client?
> Thanks in advance,
> Leila
>
>



Report this thread to moderator Post Follow-up to this message
Old Post
John Bell
05-29-05 08:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 11:41 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006