MS SQL Server 2005
Sometimes you need to return a single column that contains values that are comma separated or pipe separated or what ever floats your boat from a multiple row result set, a perfect example is returning the category id’s for a product that could be in one of more categories but you don’t want to return multiple rows with duplicate information. There are two ways of doing this or two that I know of – meaning simple enough. 1. The COALESCE method, which is probably the most common. This method works by tricking the coalesce function into doing something...
Here is a handy script that I usually run after designing a database. My database designs are usually consistent and they are made up of certain fields/columns that exist on all tables. Ideally, in my world all tables should have an "IsDeleted/bit" column and some auditing columns such as "CreatedOn", "ModifiedOn", "CreatedBy" and "ModifiedBy". To reduce the time it takes to design these tables, I always ignore those columns and run this script after I'm done with the design. The script simply loops through all the tables in the database and determines whether or not it has the required columns, if not it...
Database access layers (DAL) are still archaic and hard to design and develop, for the .Net developer there are tons of ways to design a DAL. As for me, I got fed up a few years ago and basically used generators to generate the layer for me and as time passes by I needed something more custom to my style of coding, so I developed my own custom DAL generator. Anyway, to cut a long story very short, SQL server has advanced forward, so I have to keep updating the generator every now and then, mainly because there are simpler ways of...
Stumbled across a link to a set of FREE SQL Server tools from IDERA. Check them out, you never know when you are going to need them. SQL Safe Free High Performance SQL Server Backup & Recovery Tool Idera’s SQLsafe Freeware Edition is free SQL Server database backup and recovery tool based on our award-winning SQLsafe product. SQLsafe Freeware Edition gives you a really high-performance backup and recovery engine, a scriptable interface (command line and XSP) and the ability to backup and compress any size and any number of databases, all for free. SQL Check Free SQL Server Performance Dashboard...
These are the questions that I usually ask during an interview process with an applicant that is in for a technical assessment interview. These questions assumes that you are well rounded and full blown .NET Web Developer. A .NET web developer should at least know ASP.NET, C#/VB.NET and TSQL.
What are HttpModules and HttpHandlers, and what is the difference between the two?
What is the difference between CREATE PROC and CREATE PROCEDURE?
What is ViewState and what are its advantages and disadvantages?
...
As an IT Consultant with numerous number of projects that has to do with a lot of data which at the end of the day requires paging - I'm really tired of writing paging methods for every project. Therefore, on this nice beautiful Saturday I've decided that I'll knock out a paging control which I'll gladly call the Data Pager Control.
It's almost inevitable to get a project these days that doesn't require some kind of data management. The two major aspects of web development that takes the majority of my time are: UI and Data Access. I've taken upon...
Ok, these 3 functions could be confusing - I have seen people use these functions in-appropriately, so I decided to put together a basic list of differences between them. These are points that should be noted before using any of these SQL functions included in the title. These functions are very similar and should be used carefully If no inserts occur @@IDENTITY will be NULL If multiple rows are inserted, @@IDENTITY will hold the last identity value generated @@IDENTITY does not revert to the previous setting if the insert/select into statement fails - same applies if the transaction is rolled back. @@IDENTITY and SCOPE_IDENTITY...
Rob has recently announced that SubSonic 2.0 BETA 1 is ready for download. SubSonic is my favorite library, nothing comes close - not even EntLib. If you haven't used it, step out now and give it a try. It is simply faster and better. Great Job guys! Here are some of the cool new features:
Multiple database support - I've been waiting for this feature!
Support for EntLib 3.0
New command line tool
Improved querying
New custom controls
bug fixes and more...
Read...
Next entries »