January 2008 Entries

Software Development / Programming with Passion

I attended a dinner a few days ago with my friend, mentor and co-worker Andy Warren. He was hosting a dinner with attendees from the class he was teaching. Being a football fan I struck up a conversation about my favorite sport with a few of the other guys at the table. A few minutes after listening to our conversion Andy interjected and stated "Now if I could get that type of passion in his work we'd be getting somewhere".

Uploading an image or file using LINQ TO SQL (System.Linq.Data.Binary)

I did a search for uploading an image (or any file) using LINQ TO SQL and could not find a blog or article. Here is a quick note on how to do this. The following code assumes that you have a "FileUpload" control on your webform. I'm using a stored procedure to add a row to my "Users" table. I have a column named "Photo". The sql server datatype for Photo column is "Image".

LINQ TO SQL Dynamic Queries

Earlier this week I ran into a problem with LINQ and building a Dynamic query. The issue is I wanted to build a search string based on the data in my function parameters.

LINQ TO SQL Sync / Refresh Tables in Designer?

ran into my first problem with LINQ TO SQL a couple of days ago and forgot about it. I ran into again today and decided to let everyone know about it. What I ran into was if you change an underlying table in SQL Server there is not a way to "refresh" or "sync" the table in the LINQ TO SQL Designer. The only way to get the updated table is to delete the current table from the designer and then add it again to the designer.

Speaking at the 2008 South Florida Code Camp

Extension Methods in VB.NET 2008

One of the cool new features of .NET 3.5 is extension methods. What is an extension method? In layman’s terms it's a method that can be added to an existing class without inheriting that existing class. The official definition from Microsoft is "Visual Basic 2008 introduces extension methods, which enable developers to add custom functionality to data types that are already defined without creating a new derived type. Extension methods make it possible to write a method that can be called as if

LINQ TO SQL Caching Gotcha

Ran across a small issue with LINQ TO SQL I'd like to share. As you may or may not know LINQ TO SQL's default behavior when retrieving a result set from the database for an entity is to keep that object in cache. If you run another query against linq attempting to retrieve the same row, LINQ will return the cached object. Depending on how you want your program to behave this can be a good thing or a bad thing. For me, this was a bad thing.

Returning a single row from a stored procedure using LINQ TO SQL

I had an issue today where for a while it seemed that I could not return a single row from a LINQ query that utilizes a stored procedure. After some digging around I found that it is possible and very easy.

How do you get the value of newsequentialid

In SQL Server 2005, there is a function called "newsequentialid". newsequentialid can only be used as a default constraint on a uniqueidentifer column.

LINQ TO SQL ROCKS!

New Blog

«January»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
272829303112
3456789