Archive for 'Sql Server' Category
SqlError "The server encountered a stack overflow during compile time."
5 August 2008This morning I see from a server log this frightening error.. “The server encountered a stack overflow during compile time”. Fortunately I used elmah to log all error of the site, so I immediately find the page that gives that problem.
It turns out that in a page we used to make some query to get [...]
detecting if finally block is executing for an manhandled exception
25 July 2008DisposableAction pattern is one of the most useful I , I used it to manage transaction for a DataAccess helper. I begin a transaction with DataAccess.BeginTransaction() that returns an IDisposable object that automatically dispose the tranasction. Here is an example of a typical use
using (DataAccess.BeginTransaction())
{
//Do whatever query you want with [...]
Retrieving long XML data from SQL without XmlReader
3 July 2008As I told in a previous post if you have to retrieve a great amount of XML generated by a FOR XML in a sql server 2005 environment, you cannot use the ExecuteScalar() method of the Command object. The executeScalar in fact returns only a small amount of XML, so the right way to do [...]
Use Sql server Publishing wizard to keep track of the change of the database structure
10 June 2008One of the most important procedure in software development, is keeping track of every change in the project, to accomplish this task we have source control system like subversion or cvs. When you develop application that are based on a database, it is fundamental that you do not loose track of the database structure, but [...]
Get great amount of data with T-SQL for xml
8 May 2008I’m creating some big xml files to test performance of linq to xml to make some PoC. I use simply the ForXml to extract data from Customer and Orders table of northwind database, The first Xml is 517 Kb, but I need really bigger file.
The trick is simple I created another table called insertHelper [...]
>