Seeing if a Table Has an Identity Field

The SQL snippet will return a bit value of 1 (one) for tables that have an identity field.

OBJECTPROPERTY(OBJECT_ID('MyTableName'), 'TableHasIdentity')

Leave a Comment

ASP.NET AJAX In-Depth: Object Inheritance - Stephen Walther on ASP.NET MVC

Very handy explanation of JavaScript object inheritance with ASP.NET Ajax:

ASP.NET AJAX In-Depth: Object Inheritance - Stephen Walther on ASP.NET MVC

Leave a Comment

Reset an Identity Seed Without TRUNCATE

Need to reset the value of an IDENTITY field in SQL, but can’t use TRUNCATE on the table in question for some reason (like FOREIGN KEY refernces)? You can use:

DBCC CHECKIDENT('TableName', RESEED, 0)

The last parameter is the good one. It is the value BEFORE the next identity value that will be used in the table on the next insert. Assuming your identity increment value is 1, the statement above would cause the next inserted value of the identity field to be 1… if your increment was 10, the next value would be 10. The table doesn’t have to be empty to use this method to reset the identity field’s seed, but the last parameter should be at least equal to the highest value currently in the identity field.

Leave a Comment

Charlie Calverts Community Blog : LINQ and Deferred Execution

Charlie gives some VITAL information in this post for anyone planning to use LINQ to SQL. Enjoy.

Charlie Calverts Community Blog : LINQ and Deferred Execution

Leave a Comment

Custom Workflow Activities in a Class Library Project

Found this article with quick and easy steps to build custom Windows Workflow  activities in a Class Library project.  Save LOTS of time.

Making a Custom Activity Work in Your Project even if you started with a class library

Leave a Comment

Wordpress PDA Plugin

You no longer have any excuse NOT to have a PDA friendly blog. I’ve been playing with this plugin for the past few days, and I like it. It simply renders your blog using an alternate theme (located in it’s plugin folder) if it detects a mobile device. After you activate the plugin, you won’t even see ANY traces of it until you view your blog with a mobile device.
Imthiaz Blog » Wordpress PDA Plugin

Leave a Comment

Cure For Hosting Headaches

What is the cure? Find a new host. I fired Brinkster. I don’t usually give shout outs to hosting providers, but HostMySite.com is excellent. I won’t go into a full commercial, but they’re service staff is fast, helpful, and KNOWLEDGEABLE. You don’t have to go through three layers of people to get to someone who understands what you’re talking about and is willing to help. They have a deal on they’re hosting plans right now (the .NET ones at least) where you get 3 months for $4.95 total… no strings at all. You don’t like them, just close your account and you’ve only lost less than 5 dollars.

By the way, this isn’t a paid endorsement of any kind. There is no referral code in the link, and I don’t get kick-backs for sending people to their site. After dealing with Brinkster and several other hosting companies for my customers, this transition was so refreshing I felt like saying something about it.

Comments (1)

Still Thrashing In Pain

Brinkster failed to meet their MySql update target this past week. So much for being a service company. Well… maybe we have a new service slogan for hosting companies… Break it Fast, Fix it Slow! Once they finally get things updated, or I find a new hosting company that meets my eclectic requirements (ASP.NET 2.0, PHP, and MySql… go figure…), I plan to once again start publishing information that might be useful or amusing to someone.

Leave a Comment

Hosting Provider Headaches

Like many other WordPress users that happen to have Brinkster as a hosting provider, I am experiencing some pain due to poor update planning on the hosted MySQL servers. I have already vented in the WordPress forums, and to Brinkster support, so I will spare everyone the details here. As a side effect, I have had to disable user registration and comments until the servers are properly patched due to rampant errors whenever a single quote is used anywhere in the posted text (notice my complete lack of the use of contractions in the last couple of posts).

Luckily (I guess), this is a really new site. So not too many people should notice ;).

Leave a Comment

Master Pages : Best… Thing… Ever…

I have been working recently on projects that require the use of ASP.NET 1.1. Luckily, for me, the hosting company that provides service to one of my clients added support for ASP.NET 2.0 to its servers. Well… IF you are very patient with thier control panel. This new opportunity to work with 2.0 made me realize just how much I LOVE master pages. Anyone who has not had a chance to check them out… DO IT NOW… I am including a simple set of web files that give a SIMPLE demonstration of master pages. They can do A LOT more, but this should be a good, simple example.

ASP.NET 2.0 and the 2.0 Framework include so many enhancements to make the platform better and easier to use, but master pages are, in my opinion, one of the most useful featues introduced in 2.0. Having said that, there are a few things that someone new to master pages will need to adjust to. The one you will probably notice the first is that aspx pages that use master pages can only contain directives (Page, Import, etc…), and asp:Content controls at the root level. So if you are accustomed to using script tags (<% %>) in your aspx files, they will need to be contained in one of the content blocks, or the corresponding code will need to be moved to a parent/code-behind class.

Oh well. It is late for me. I hope the example is useful.

Master Pages

Leave a Comment