{"id":2528,"date":"2019-08-26T09:54:32","date_gmt":"2019-08-26T09:54:32","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=2528"},"modified":"2022-03-17T05:21:02","modified_gmt":"2022-03-17T05:21:02","slug":"implement-error-handling-and-transactions","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/","title":{"rendered":"Implement error handling and transactions"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><strong>Exam 70-761: Querying Data with Transact-SQL retired on 31 January, 2021.<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"transact-sql-statements\"><strong>Transact-SQL statements<\/strong><\/h3>\n\n\n\n<p>We shall now discuss the categories of statements for use with Transact-SQL (T-SQL). You can find all of the statements listed in the left-hand navigation. <\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Data Definition Language<\/strong><\/h4>\n\n\n\n<p>Data Definition Language (DDL) statements defines data structures. Use these statements to create, alter, or drop data structures in a database.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ALTER<\/li><li> Collations<\/li><li> CREATE<\/li><li> DROP<\/li><li> DISABLE TRIGGER<\/li><li> ENABLE TRIGGER<\/li><li> RENAME<\/li><li> UPDATE STATISTICS<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Data Manipulation Language<\/strong><\/h4>\n\n\n\n<p>Data Manipulation Language (DML) affect the information stored in the database. Use these statements to insert, update, and change the rows in the database.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>BULK INSERT<\/li><li> DELETE<\/li><li> INSERT<\/li><li> UPDATE<\/li><li> MERGE<\/li><li> TRUNCATE TABLE<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Permissions statements<\/strong><\/h4>\n\n\n\n<p>Permissions statements determine which users and logins can access data and perform operations. For more information about authentication and access, see the Security center.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Service Broker statements<\/strong><\/h4>\n\n\n\n<p>Service Broker is a feature that provides native support for messaging and queuing applications. For more information, see Service Broker.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Session settings<\/strong><\/h4>\n\n\n\n<p>SET statements determine how the current session handles run time settings. For an overview, see SET statements.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>SQL Server 2005 &#8211; Try and Catch Exception Handling<\/strong><\/h3>\n\n\n\n<p>With SQL Server 2005, new error handling has been introduced with the TRY\u2026CATCH processing.  Basically what happens is when an error occurs the processing in the TRY block stops and processing is then picked up in the CATCH block.  The following illustrates a simple example of how this is done &#8211;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Step<\/strong><\/td><td><strong>Code<\/strong><\/td><td><strong>Output<\/strong><\/td><\/tr><tr><td>1<\/td><td>CREATE PROCEDURE usp_ExampleProc<br>AS<br>&nbsp;&nbsp;&nbsp;&nbsp; SELECT * FROM NonexistentTable;<br>GO<\/td><td>Command(s) completed successfully.<\/td><\/tr><tr><td>2<\/td><td>EXECUTE usp_ExampleProc<\/td><td>Msg 208, Level 16, State 1, Procedure usp_ExampleProc, Line 3<br>Invalid object name &#8216;NonexistentTable&#8217;.(Note: Processing Stops)<\/td><\/tr><tr><td>3<\/td><td>BEGIN TRY<br>&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE usp_ExampleProc<br>END TRY<br><br>BEGIN CATCH<br>&nbsp;&nbsp;&nbsp;&nbsp; SELECT&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_NUMBER() as ErrorNumber,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_MESSAGE() as ErrorMessage;<br>END CATCH;<\/td><td>208 Invalid object name &#8216;NonexistentTable&#8217;.(Note: Processing Continues)<\/td><\/tr><tr><td>4<\/td><td>BEGIN TRY<br>&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE usp_ExampleProc<br>END TRY<br><br>BEGIN CATCH<br><br>END CATCH;<\/td><td>Command(s) completed successfully.(Note: Processing Continues)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<ul class=\"wp-block-list\"><li>As you can see from the above code and output that when we create the stored procedure for a non-existent table in Step 1 the procedure creates without a problem.&nbsp;<\/li><li>If we run the stored procedure using the code in Step 2, we get an error message that the object does not exist.<\/li><li>If we run the stored procedure using the code in Step 3, the error is sent to the CATCH block and an error message is returned. At this point processing can continue without a problem.<\/li><li>To further illustrate this in Step 4 the stored procedure is run, the error is caught in the CATCH block, but we are not doing anything to process the error.&nbsp; Normally you would have something happen, but this shows that you don&#8217;t have to have any code in the CATCH block.<\/li><\/ul>\n\n\n\n<p>The values that can be retrieved from the error are also much more detailed, then what you could get with previous versions of SQL Server.&nbsp; Below is a list of the data that can be retrieved when an error occurs.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ERROR_NUMBER() &#8211; returns the number of the error.<\/li><li>ERROR_SEVERITY() &#8211; returns the severity.<\/li><li>ERROR_STATE() &#8211; returns the error state number.<\/li><li>ERROR_PROCEDURE() &#8211; returns the name of the stored procedure or trigger where the error occurred.<\/li><li>ERROR_LINE() &#8211; returns the line number inside the routine that caused the error.<\/li><li>ERROR_MESSAGE() &#8211; returns the complete text of the error message.<\/li><\/ul>\n\n\n\n<p>Running the same query above, but returning all of the error information is displayed below.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>ERROR_NUMBER<\/strong><\/td><td><strong>ERROR_SEVERITY<\/strong><\/td><td><strong>ERROR_STATE<\/strong><\/td><td><strong>ERROR_PROCEDURE<\/strong><\/td><td><strong>ERROR_LINE<\/strong><\/td><td><strong>ERROR_MESSAGE<\/strong><\/td><\/tr><tr><td>208<\/td><td>16<\/td><td>1<\/td><td>usp_ExampleProc<\/td><td>3<\/td><td>Invalid object name &#8216;NonexistentTable&#8217;.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Another nice thing about the TRY&#8230;CATCH processing is that you can nest or have multiple TRY&#8230;CATCH blocks in your code.&nbsp; The following although not very practical illustrates how the error is caught and then processing continues and the error is caught again and processing continues again.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Step<\/strong><\/td><td><strong>Code<\/strong><\/td><td><strong>Output<\/strong><\/td><\/tr><tr><td>1<\/td><td>BEGIN TRY<br>&nbsp;&nbsp;&nbsp;&nbsp; BEGIN TRY<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE usp_ExampleProc<br>&nbsp;&nbsp;&nbsp;&nbsp; END TRY<br><br>&nbsp;&nbsp;&nbsp;&nbsp; BEGIN CATCH<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_NUMBER() AS ErrorNumber,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_SEVERITY() AS ErrorSeverity;<br>&nbsp;&nbsp;&nbsp;&nbsp; END CATCH;<br><br>&nbsp;&nbsp;&nbsp;&nbsp; EXECUTE usp_ExampleProc<br>END TRYBEGIN CATCH<br>&nbsp;&nbsp;&nbsp;&nbsp; SELECT<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_NUMBER() AS ErrorNumber,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ERROR_SEVERITY() AS ErrorSeverity;<br>END CATCH;<\/td><td>208 Invalid object name &#8216;NonexistentTable&#8217;.&nbsp;208 Invalid object name &#8216;NonexistentTable&#8217;.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"trycatch-transact-sql\"><strong>TRY&#8230;CATCH (Transact-SQL)<\/strong><\/h4>\n\n\n\n<p><strong>TRY\u2026CATCH (Transact-SQL)<\/strong><\/p>\n\n\n\n<p>Implements error handling for Transact-SQL that is similar to the exception handling in the Microsoft Visual C# and Microsoft Visual C++ languages. A group of Transact-SQL statements can be enclosed in a TRY block. If an error occurs in the TRY block, control is passed to another group of statements that is enclosed in a CATCH block.<\/p>\n\n\n\n<p>Syntax<\/p>\n\n\n\n<p>BEGIN TRY  <br>      { sql_statement | statement_block }  <br> END TRY  <br> BEGIN CATCH  <br>      [ { sql_statement | statement_block } ]  <br> END CATCH  <br> [ ; ]  <\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Features of  TRY\u2026CATCH  <\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>A TRY\u2026CATCH construct catches all execution errors that have a severity higher than 10 that do not close the database connection.<\/li><li>A TRY block must be immediately followed by an associated CATCH block. Including any other statements between the END TRY and BEGIN CATCH statements generates a syntax error.<\/li><li>A TRY\u2026CATCH construct catches all execution errors that have a severity higher than 10 that do not close the database connection.<\/li><li>A TRY block must be immediately followed by an associated CATCH block. Including any other statements between the END TRY and BEGIN CATCH statements generates a syntax error.<\/li><li>A TRY\u2026CATCH construct cannot span multiple batches. A TRY\u2026CATCH construct cannot span multiple blocks of Transact-SQL statements. For example, a TRY\u2026CATCH construct cannot span two BEGIN\u2026END blocks of Transact-SQL statements and cannot span an IF\u2026ELSE construct.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Retrieving Error Information<\/strong><\/h4>\n\n\n\n<p>In the scope of a CATCH block, the following system functions can be used to obtain information about the error that caused the CATCH block to be executed &#8211; <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>ERROR_NUMBER() returns the number of the error.<\/li><li>ERROR_SEVERITY() returns the severity.<\/li><li>ERROR_STATE() returns the error state number.<\/li><li>ERROR_PROCEDURE() returns the name of the stored procedure or trigger where the error occurred.<\/li><li>ERROR_LINE() returns the line number inside the routine that caused the error.<\/li><li>ERROR_MESSAGE() returns the complete text of the error message. The text includes the values supplied for any substitutable parameters, such as lengths, object names, or times.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"errors-unaffected-by-a-trycatch-construct\"><strong>Errors Unaffected by a TRY&#8230;CATCH Construct<\/strong><\/h4>\n\n\n\n<p>TRY&#8230;CATCH constructs do not trap the following conditions &#8211; <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Warnings or informational messages that have a severity of 10 or lower.<\/li><li>Errors that have a severity of 20 or higher that stop the SQL Server Database Engine task processing for the session. If an error occurs that has severity of 20 or higher and the database connection is not disrupted, TRY&#8230;CATCH will handle the error.<\/li><li>Attentions, such as client-interrupt requests or broken client connections.<\/li><li>When the session is ended by a system administrator by using the KILL statement.<\/li><\/ul>\n\n\n\n<p>The following types of errors are not handled by a CATCH block when they occur at the same level of execution as the TRY&#8230;CATCH construct:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Compile errors, such as syntax errors, that prevent a batch from running.<\/li><li>Errors that occur during statement-level recompilation, such as object name resolution errors that occur after compilation because of deferred name resolution.<\/li><li>Object name resolution errors<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>THROW (Transact-SQL)<\/strong><\/h3>\n\n\n\n<p>Raises an exception and transfers execution to a CATCH block of a TRY&#8230;CATCH construct in SQL Server 2017. <\/p>\n\n\n\n<p> THROW [ { error_number | @local_variable },           { message | @local_variable },           { state | @local_variable } ]    [ ; ]   <\/p>\n\n\n\n<p>THROW [ { error_number | @local_variable },  <br>         { message | @local_variable },  <br>         { state | @local_variable } ]   <br> [ ; ]\n\n\n\n<p><strong>NOTES<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The statement before the THROW statement must be followed by the semicolon (;) statement terminator.<\/li><li>If a TRY&#8230;CATCH construct is not available, the statement batch is terminated. The line number and procedure where the exception is raised are set. The severity is set to 16.<\/li><li>If the THROW statement is specified without parameters, it must appear inside a CATCH block. This causes the caught exception to be raised. Any error that occurs in a THROW statement causes the statement batch to be terminated.<\/li><li>% is a reserved character in the message text of a THROW statement and must be escaped. Double the % character to return % as part of the message text, for example &#8216;The increase exceeded 15%% of the original value.<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"differences-between-raiserror-and-throw\"><strong>Differences Between RAISERROR and THROW<\/strong><\/h4>\n\n\n\n<p>The following table lists differences between the RAISERROR and THROW statements.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>RAISERROR statement<\/th><th>THROW statement<\/th><\/tr><\/thead><tbody><tr><td>If a&nbsp;<em>msg_id<\/em>&nbsp;is passed to RAISERROR, the ID must be defined in sys.messages.<\/td><td>The&nbsp;<em>error_number<\/em>&nbsp;parameter does not have to be defined in sys.messages.<\/td><\/tr><tr><td>The&nbsp;<em>msg_str<\/em>&nbsp;parameter can contain&nbsp;<strong>printf<\/strong>&nbsp;formatting styles.<\/td><td>The&nbsp;<em>message<\/em>&nbsp;parameter does not accept&nbsp;<strong>printf<\/strong>&nbsp;style formatting.<\/td><\/tr><tr><td>The&nbsp;<em>severity<\/em>&nbsp;parameter specifies the severity of the exception.<\/td><td>There is no&nbsp;<em>severity<\/em>&nbsp;parameter. The exception severity is always set to 16.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Exam 70-761: Querying Data with Transact-SQL retired on 31 January, 2021. Transact-SQL statements We shall now discuss the categories of statements for use with Transact-SQL (T-SQL). You can find all of the statements listed in the left-hand navigation. Data Definition Language Data Definition Language (DDL) statements defines data structures. Use these statements to create, alter,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1931,"menu_order":12,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[],"tags":[358,369,424],"class_list":["post-2528","page","type-page","status-publish","hentry","tag-microsoft-70-761","tag-microsoft-70-761-exam-dumps","tag-try-catch"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Implement error handling and transactions - Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Implement error handling and transactions - Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-17T05:21:02+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/\",\"name\":\"Implement error handling and transactions - Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-26T09:54:32+00:00\",\"dateModified\":\"2022-03-17T05:21:02+00:00\",\"description\":\"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exam 70-761: Querying Data with Transact-SQL\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Implement error handling and transactions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Implement error handling and transactions - Testprep Training Tutorials","description":"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/","og_locale":"en_US","og_type":"article","og_title":"Implement error handling and transactions - Testprep Training Tutorials","og_description":"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-17T05:21:02+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/","name":"Implement error handling and transactions - Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-26T09:54:32+00:00","dateModified":"2022-03-17T05:21:02+00:00","description":"Get ready to boost your learning and prepare for implement error handling and transactions with hundreds of practice test Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/implement-error-handling-and-transactions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Exam 70-761: Querying Data with Transact-SQL","item":"https:\/\/www.testpreptraining.ai\/tutorial\/exam-70-761-querying-data-with-transact-sql\/"},{"@type":"ListItem","position":3,"name":"Implement error handling and transactions"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2528","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=2528"}],"version-history":[{"count":6,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2528\/revisions"}],"predecessor-version":[{"id":53012,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2528\/revisions\/53012"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/1931"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=2528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=2528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=2528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}