Skip to main content
8 votes

Best practices for committing a transaction in SQL Server where TRY CATCH is used

The best way I have found to do this is the following code: SET XACT_ABORT ON; BEGIN TRY BEGIN TRANSACTION /* Code goes here */ COMMIT TRANSACTION END TRY BEGIN CATCH ...
George.Palacios's user avatar
4 votes

Best practices for committing a transaction in SQL Server where TRY CATCH is used

Option A is the correct choice. It is possible for all statements in a transaction to work and then the actual COMMIT to fail, so you keep the COMMIT inside your TRY block so that any failure of the ...
HandyD's user avatar
  • 10k
3 votes

What is back-end programming?

Back-end and front-end are emerging separations of concerns in development, typically these days "web development". In some shops you have two types of developers, often on separate teams. ...
Evan Carroll's user avatar
  • 63.9k
3 votes

I am trying to run this code and I get an error at line 11

CREATE TABLE IF NOT EXISTS `tblproduct` ( `id` int(8) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `code` varchar(255) NOT NULL, `image` text NOT NULL, `price` double(10,2) NOT ...
Vérace's user avatar
  • 30.2k
2 votes

MySQL code error

You need to remove the comma after the last column declaration. CREATE TABLE student ( student_id INT PRIMARY KEY, first_name VARCHAR(20), major VARCHAR(20) );
Vitaliy Zlobin's user avatar
2 votes

MYSQL - Operand should contain 1 column(s) - Nested Case statement

CASE in MySQL can either be a statement, or an expression. Since your CASE statement is in a SELECT list, it's being treated as an expression. As an expression, it should return a single value. You'...
RDFozz's user avatar
  • 11.6k
1 vote

Access Send Email. Loop Not Building Table

The problem was with the comments field. I had the field set to Rich Text and I was exporting Plain text on the query. [Comment(s):PlainText([Comments] For some reason, if it got to a record with rich ...
AdamB's user avatar
  • 88
1 vote

What is back-end programming?

Server side would typically have no UI. Server side is the business rules, data layer, and database (if required). Server side will typically have authentication. Client side is the UI and will ...
paparazzo's user avatar
  • 5,065

Only top scored, non community-wiki answers of a minimum length are eligible