Jason N. Gaylord
Coder
from Northeast PA
Small planet on JasonGaylord.com A planet with rings on JasonGaylord.com
Visit JasonGaylord.com

Hello, I'm  jasongaylord Jason

I live with my family in the rolling hills of Northeastern Pennsylvania. I'm a web developer by trade, but have broad experience in various business areas. Want to know more about me?

Learn More

Retrieving SQL Type Image Using LINQ

LINQ views the Image type in SQL Server as Binary. So, there are a few options that we have. We can either (a) modify our LINQ to SQL class and change the property to Byte() instead of Binary or we can (b) convert the Binary to an array. To do the latter, you can use a lambda expression to obtain the image you are looking for and grabbing just the image. Here’s an example:

Read More

ASP.NET MVC Preview 3 Announced

Scott Guthrie just posted about the 3rd preview of the ASP.NET MVC over on his blog. You can catch the full details here: http://weblogs.asp.net/scottgu/archive/2008/05/27/asp-net-mvc-preview-3-release.aspx.

Read More

Attention Twitter: Wise up!

I read through the Twitter blog from time to time just to see how things are going. Apparently, things aren’t going good. Pagination and IM updates have been temporarily disabled and something has caused my twitter utilities (twhirl and OutTwit) to cease function. I keep getting an error that shows “Rate limit exceeded. Clients may not make more than 30 requests per hour.” Can you imagine if Twitter was an eCommerce shop and stopped a viewer after 30 page views? They’d slowly lose business. Does the Twitter team get that?

Read More

Force Your Website To Be IE8 Compatible

Microsoft recognizes that it will be difficult to have all sites use the latest HTML and CSS specs that are found in IE8. To accommodate the web sites that cannot be converted at this time, they’ve created a work around. There are two options: a) you can modify the config in IIS 7 or b) you can add a new meta tag to your page headers. More information about this can be found by visiting http://support.microsoft.com/kb/952030.

Read More

SQL Management Studio Shows All Databases

This has “bugged” me for awhile. When you log into any version of SQL (2000, 2005, and even 2008) as a user with restricted access to just a single database (or even a few databases), you can still see a complete list of all the databases on that server. There have been times when I needed to share a database with a customer or have accessed a shared database at a host such as DiscountASP.net or GoDaddy and can see all of the customers on that one box. It’s more of a nuisance than a real threat but I really wish it was changed. It has been confirmed as a bug. Please vote for it at http://tinyurl.com/6pk74q.

Read More

Using "Like" in LINQ to SQL

I’ve recently discovered that LINQ and VB can be confusing. I was attempting to pull the top 10 rows of a table where the column started with ‘W’. You’d think after I typed that, I’d figure out the solution. That’s not the case. Instead, I struggled. Here’s what I originally came up with:

Read More

Using LINQ to SQL and ConnectionStrings in a Class Library

I was looking to separate my LINQ to SQL data layer from the rest of my application. So, I decided to move the files to a class library. This way, when my application builds, all of my LINQ files are found in MyApp.DL or something similar. However, I wanted the class library to use the SQL connection that I have set in my web.config. Because the class library does not have a reference to System.Configuration, I had to add that first. I then created a partial class for my Context object. Inside, I created a new constructor with a boolean parameter called UseWebConfigConnectionString. My web.config would contain a generic connection string name called LinqSqlConnectionString. This allows me to make changes to the LINQ files, save them, and not affect this method. So, here’s what I ended up with:

Read More

Obtain the Identity of a New Row Using LINQ

It’s actually pretty easy and user friendly to obtain the value of the identity column using LINQ. After you create your object and insert it on submit, you can call the identity column’s property on your object. For instance:

Read More

3G iPhone will Come In June

According to Gizmodo, the iPhone 3G launch date will be June 9th. It will be interesting to see what further market share the iPhone will capture with this latest phone. I know many individuals have held out from purchasing an iPhone because of the lack of 3G support. It will also be interesting to see what phones other providers will release to compete with the iPhone. For more details, visit http://tinyurl.com/5pe7pc.

Read More

Philly.net Code Camp #2

The second Philly.net Code Camp will be held tomorrow. Roughly 600 attendees will get to see some great talks in 8 different tracks. For more information about the event, check out http://tinyurl.com/5t7qdw.

Read More