Stored procedure insert not updating database


01-Jan-2015 16:46

stored procedure insert not updating database-23

Hot sex chat no credit money

Over the years I have had to adapt to many issues presented before me as a Database Administrator and I have gathered many scripts to deal with them.One that has become quite a topic is XML integration for transactions to the database.

A few points of interest, I used a while loop verses a cursor to keep down the resource overhead and keep the speed up, and for those that haven't learned the hard way with sp_executesql since we have to pass in the XML into the statement, we only have nvarchar(4000) to store the statement, which causes chaos when you have tables with many columns.

Based on this result one of two queries is executed to either insert into or update a record in a table: For this and the examples that follow, the table called 'optionprefs' that I'm using contains three columns; id (MEDIUMINT/AUTO_INCREMENT), userid (MEDIUMINT), options (VARCHAR).