Using T4 Templates with GDR Database Projects

For this blog I’ve developed an add-in for General Distribution Release (GDR) for Visual Studio Team System 2008 Database Edition projects (better known as “Data Dude”) which will generate Create, Read, Update and Delete (CRUD) stored procedures for a particular table in your model.  I wanted to provide the ability to affect the content of…

15

Template Driven Sql Generation

Recently Duke Kamstra and I demonstrated how you can use Visual Studio 2008 Database and Server projects to deploy Sql Server permission objects to your various Sql Server instances. It’s common to develop on a local box with admin rights, and then restrict those rights as you start deploying to test, pre-production and, eventually, your…

9

Importing Multiple Scripts using DTE

We have had a lot of requests from folks that would rather not go through the Import Script Wizard when they have multiple T-SQL source scripts. Fortunately Visual Studio provides the ability to execute parameterized commands by using the Design Time Extensibility (DTE) framework. For a typical list of such commands visit this MSDN Library…

8

Data Compare DTE Commands

In this blog I’ll lead you through the various parameters for the “Data.NewDataComparison” command available in the General Distribution Release (GDR) for Visual Studio Team System 2008 Database Edition. This command launches the Visual Studio Data Compare editor. If you have the Visual Studio Team System 2008 GDR installed, open it and navigate to the…

7

Schema Compare DTE Commands

In this blog I’ll lead you through the various parameters for the “Data.NewSchemaComparison” command available in the General Distribution Release (GDR) for Visual Studio Team System 2008 Database Edition and Visual Studio 2010 Beta 2.  This command launches the Visual Studio Schema Compare editor and can, optionally begin a comparison between database projects, .dbschema files…

6

Using T4 Templates with Visual Studio 2010 Database Projects

  I had a request to update my Visual Studio 2008 GDR Database projects CRUD generator to Visual Studio 2010. Not much has changed except for some references and directory locations. The flow of the add-in is identical to the 2008 version. Below are the pertinent links. Original blog entry Source Code Visual Studio 2010…

5

Interesting Memory Leak in .Net 3.5 Binary Deserialization

Recently I was analyzing an application written in managed code for memory problems.  In managed code a common cause of eating up memory is statically allocated objects which are not nulled out after they are no longer needed. In the application I was debugging it was making use of binary deserialization to reconstruct a graph…

5

Database Project Import Scripts Add In

In this blog I’ll introduce you to the Import Scripts add-in to the General Distribution Release (GDR) for Visual Studio Team System 2008 Database Edition. With this add-in Visual Studio can import multiple scripts to populate a target database project. I’ve included the source code but, in order to compile the install project you’ll need…

3

Navigating the Data Dude Object Model

In this blog I’ll introduce you to the basics of navigating the General Distribution Release (GDR) for Visual Studio Team System 2008 Database Edition object model. I’ve wrapped it all into an add-in so you can step through the code and extend it as you wish. I hope you find it useful! The first part…

2

Template Driven Sql Generation Updated for Visual Studio 2010

More than a year ago I presented a simple template processor for Visual Studio 2008 Database Projects. This add-in gives you the ability to write Transact-SQL in a simple template form with embedded SQLCMD variables. It’ll turn –*CREATE TABLE [dbo].[$(MyVar)] –*( –* column_1 int NOT NULL, –* column_2 int NULL –*) Into valid Transact-SQL CREATE…

2