• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

error message from database stored procedures

Engaged ,
Nov 08, 2013 Nov 08, 2013

Copy link to clipboard

Copied

I would like to have some error message show at client side from stored procedures.

I use MS SQL Server and use RAISEERROR, but ColdFusion does not bring the error message just ignore the error continue to run the other part of code.

I just want to know are there any way to bring stroed procedure error message to client, or I have to trap the error at Web Server or JavaScript level.

Your help and information is great appreciated,

Regards,

Iccsi,

Views

540

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 08, 2013 Nov 08, 2013

Copy link to clipboard

Copied

Just wrap your cfstoredproc in a cftry/cfcatch.  See this for an example:

http://stackoverflow.com/questions/1879754/accessing-raiseerror-message-from-cfstoredproc

There's no way your javascript can trap this server-side error though, unless you were calling your CFM page that calls the stored proc via an AJAX request.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 09, 2013 Nov 09, 2013

Copy link to clipboard

Copied

LATEST

Thanks a million for the information and help,

Regards,

Iccsi,

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation