One of the coolest things Microsoft added to SQL Server was the ability to create user defined functions. There are different types of functions you can create. You can create a scalar function returning only a single variable. You can create set functions returning a virtual table, much like a view. You can also create your own aggregate functions, although […]
Editorials
Y2K##
Dot Net faces a number of Y2k events more frequently than ever. The number of releases of the Dot Net framework has been stepped up, sometimes as often as two in a single year. However, the number of previously released versions under active maintenance has not increased. This means that the code you write today will be un-supported in two […]
Calculated Columns
Today I wanted to demonstrate one way to create calculated columns in a SQL Server table. A Calculated column is a column where the data is not entered by a system. Instead, the value is derived by some formula or function available to the database. A calculated column may be persisted or not. You would persist a calculated column if […]
Important distinctions about working in the cloud
Some real-world distinctions come into play as you implement different solutions – learning as we go, here are some of the things we’re hitting (and hearing from others). First, the distinction outlined in comments yesterday about providers having to control the performance and resource usage of services – this is at the core of one of the differences we’ve come […]
ADO.Net Interface Example
I recently wrote about using interfaces when working with ADO.Net. I received a comment requesting an example. So, today I am going to do something a little different and provide a little simple application to demonstrate how one could declare interfaces, and instantiate objects. There are a few ways you could do the instantiation. Injection is a popular method, allowing […]
Mitigating Risk of Moving to SQL Server as a Service
Making the move to Azure for SQL Database services or even to Amazon’s RDS services for SQL Server can be hair-raising. I’m not sure why it’s so difficult. We’re in the process of moving the SQL Server as a service. We’ve been looking to understand the pros and cons of the two major service providers. It’s not as easy as […]
Running Code In Your Database
Why would you roll your own database adapter instead of using third party ORM tools? Today I’m going to share an example. Sometimes, because of the way data is stored in a database, it is easier to work with the data using SQL techniques, or maybe more efficient, than trying to do the same work in another layer. This is […]
Use ADO.Net Interfaces
In the last few months I have been using ADO to work with many different database engines (MySql, SqLite, SQL Server, Oracle and DB2). I have a basic framework I put together allowing me to easily construct and bundle one or more queries into a Unit of Work so that all of the queries are included in a single transaction. […]
ADO Basics
Today I wanted to write about good practices when working with ADO.Net. To begin with, it is important to correctly dispose of your ADO objects, as it can have a big impact on the performance against your precious database resources. There are plenty of articles and blogs on this topic to be found on the internet. So, today I just […]
DB2 and the ADO OleDbClient
Today I had the pleasure of working with DB2. I was trying to do something that is quite simple with SQL Server. I wanted to use a transaction at the ADO level, using the OleDbTransaction object. I also wanted to protect from SQL Injection. So, even though I was not using stored procedures, I wanted to use parameters to supply […]