About the author

Steven HarmanSteven Harman is a passionate developer who believes that writing great software isn't just a job, its a craft.

ASP.NET MVP

For recent posts and more about me, scroll to the bottom.

Subscribe

  • Subscribe to my feed. via RSS
  • Subscribe via email via email

Jobs

Badges

  • Subtext Project
  • Support Subtext
  • HiddenNetwork.com Banner

database

There are 4 entries for the tag database

A Better Search and Replace for Your Database

The ability to search for and replace a substring of text is such a useful, and often necessary, bit of functionality that nearly every text editor on the planet has it built in. However, the tool we often use to hold our text based data, the ubiquitous relational database, typically has very poor support for doing search and replace out of the box. Its so poor in fact that I’ve actually discussed this very topic, Search & Replace for your Database, before! However, as was noted in the comments to that post, my solution hack is not 100% effective....

Replace that Stinky Code with a Bitmask and the FlagsAttribute

Pretend that you’re building an application to do something like... oh I don’t know, track employee time. Applications like this exist in almost every company on the face of the earth. After all, time == money, duh! Lets also pretend one requirement of your time tracker is to keep track of the employee’s regular work hours - meaning their start/end times and the days of the week they work. Again, seems like a pretty simple and intuitive requirement for a time tracking system. So, here’s my question: how would you go about storing the days the employee works...

Tip: Put Connection Strings in Their Own Configuration File

asp.net 2.0 introduced a new section in the web.config file -ConnectionStrings. This new configuration section allows you to add connection strings in your web.config, like we always have, or in a different data source. In Subtext 2.0 we're using this new feature to split the connection string out into a new configuration file, user.config. Doing this should make day to day development easier for our development team by reducing the number of merge conflicts in web.config. Since most every developer has a different database configuration, it makes sense to keep this information in its own file and away from the...

Search & Replace - For Your Database

UPDATE: It appears that the .zip file I posted earlier was actually busted - I guess that's what I get for being lazy and not testing the parameterized version before putting it out there. Anyhow, Phil emailed me a version that actually works as advertised. I've updated the link at the bottom of this post, so grab the updated version from there. Search and replace is a common (and most useful) feature that is present in even the most basic of text editors. Some of the more powerful text editors (I like notepad++) even allow you to use Regular...