Writing C# Functions for SQL Server and CLR Integration

September 15, 2009
Tags: , ,

An interested problem was presented to me today where a database table in SQL Server 2005 (now moved to 2008) had a trigger attached to a table that would encrypt a credit card number on insert or update. The encryption routine used the sp_OACreate stored procedure to make use of an older Microsoft cryptography library [...]

0

How to Change the Owner of a SQL 2005 Table

December 9, 2008
Tags: ,

It isn’t often that I need such a thing, but occasionally I get asked by an engineer to change the owner of a database table in MS SQL 2005. This happens sometimes, though I cannot always remember how, but changing the owner of a table is pretty easy. Just execute the following script, making sure [...]

0

Foray into Java

February 28, 2007
Tags: , ,

So recently I’ve decided to delve into the world of Java development, or, more specifically, desktop Java development. So far I am liking it. My first task was to write a small application that would accept two dates as input and spit out a tab-separated report of first and last journal entries in a system, [...]

1

Images in SQL

February 9, 2007
Tags: , ,

So I was presented with a task today of extracting images that were stored in a Microsoft SQL Server 2000 database and save them as JPEG files. Here is a bit of code that will do this. In this code sample I am assuming domain authenticated SQL login. The table name here will be called [...]

0