Hi all,
am using an access front end (XP) and ODBC. SQL Server 2k
When doing an update statement in Query Analyser, QA will tell me I have
violated a, eg. ForeignKey in table in database.
Is there a way to return that error description from a Stored Procedure (the
violation would be from a statement in the SP)? and therefore return it
to my front end.
thanksTake a look at RAISERROR and sysmessages system table
in Books on line
"SJ" wrote:
> Hi all,
> am using an access front end (XP) and ODBC. SQL Server 2k
> When doing an update statement in Query Analyser, QA will tell me I have
> violated a, eg. ForeignKey in table in database.
> Is there a way to return that error description from a Stored Procedure (t
he
> violation would be from a statement in the SP)? and therefore return i
t
> to my front end.
> thanks
>
>|||Wouldn't that be nice :) No, not in the 2k version of SQL Server. It is up
to the client to handle and deal with errors. If your program doesn't
cancel the batch, you can raise another error after the offending statement
so you can see where the error occurred though.
----
Louis Davidson - drsql@.hotmail.com
SQL Server MVP
Compass Technology Management - www.compass.net
Pro SQL Server 2000 Database Design -
http://www.apress.com/book/bookDisplay.html?bID=266
Blog - http://spaces.msn.com/members/drsql/
Note: Please reply to the newsgroups only unless you are interested in
consulting services. All other replies may be ignored :)
"SJ" <myocard@.hotmail.com> wrote in message
news:asq_d.10693$1S4.1124667@.news.xtra.co.nz...
> Hi all,
> am using an access front end (XP) and ODBC. SQL Server 2k
> When doing an update statement in Query Analyser, QA will tell me I have
> violated a, eg. ForeignKey in table in database.
> Is there a way to return that error description from a Stored Procedure
> (the violation would be from a statement in the SP)? and therefore
> return it to my front end.
> thanks
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment