Archive for the ‘C#’ Category

Experimenting with SQL to JSON in SQL Server 2008

Posted: 14th July 2010 by Adam Presley in C#, Development, SQL
Tags: , ,

In the last couple of days at work my friend Adrian (@iknowkungfoo) and I (@adampresley) have been tossing around how we can improve performance on various portions of the application we work on. On of the trouble areas has always been large query sets that then have to be transformed into JSON for an AJAX [...]

Writing C# Functions for SQL Server and CLR Integration

Posted: 15th September 2009 by Adam Presley in C#, Development, SQL
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 [...]

Consuming Web Services in .NET 3.5 – Web References

Posted: 10th February 2009 by Adam Presley in C#, Development, General
Tags: ,

I have to admit I feel a little bit behind the curve. I’ve not goofed too much with the .NET 3.5 specific stuff much lately, and much of my experience has been in .NET 2.0. But today I packed up the laptop and headed to Starbucks to get out of the office so I could [...]

Tutorial: .NET XML Into A DataSet

Posted: 8th April 2008 by Adam Presley in C#, Development
Tags: , ,

New tutorial for C# about using XML data in a DataSet object for manipulating the data like it came from a database. See the Software Development section, or go straight to it here. Cheers, and happy coding!

Beep on the Enter Key

Posted: 22nd August 2007 by Adam Presley in C#, Development
Tags: ,

One of the applications that I wrote and maintain here for use at my job is a C# Windows application. A couple of revisions ago I set it up so that the user could press the Enter key to submit the login instead of having to click the actual login button. For the longest time [...]

SyncXpress Update

Posted: 3rd April 2007 by Adam Presley in C#, Development

Ladies and Gentlemen! I have put up for public download the first alpha release of SyncXpress. It is still in VERY early production, and not ready for prime time, so use at your own risk. You will need .NET 2.0 to run this application. I also hope to have a forum up soon for feedback [...]

Images in SQL

Posted: 9th February 2007 by Adam Presley in C#, Development
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 [...]

Logical Drives and WMI

Posted: 1st February 2007 by Adam Presley in C#, Development
Tags: ,

In an effort to support removable media devices in SyncXpress I’ve had to do a bit of learning about WMI in .NET. It is actually quite cool how much information you can get from WMI about ANY piece of hardware attached to your system, and even INSIDE your system. So in my case I want [...]