Monday, July 24, 2006

Easy Page Layout Grids from Yahoo!

I found out that Yahoo! has a whole developer section with lots of great information for developers. One of my favorites is the Yahoo! UI Library: Grids CSS It allows you to use CSS to layout your page and if you ever want to change something it can be as easy as changing one character in the markup to have a new layout. You can move the sidebar from the left to the right or change the width of it, or completely remove it, for example. There's also a way to stack special grids in the main content section to allow for just about any design you could want... Check it out.

Friday, July 07, 2006

Google Finance: My Thoughts

I really like the charting features and clean look of Google Finance however the blog section of the site needs some work. I have found that the information it contains for the company I work for is irrelevant. Google simply does a blog search for the name of the company in question and displays whatever it finds.

This may be OK for large companies, but for smaller ones the blog posts it lists look as if they were created just so that they would show up in the search for the name of a particular company. It seems to me as if it's a case of unscrupulous bloggers trying to "spam" (can't think of a better word) the blog search engine.

I searched high and low for a way to ask Google to remove those irrelevant results and asked a question on the Google Groups support forum about it last month, but received no response. I think they should either improve the search to exclude more irrelevant posts, provide a way to have them removed, or provide us with the option to turn off the blog section completely... perhaps through some personal settings or a query string.

Get a connection string from web.config

I recently needed to get a connection string from my web.config file and had some trouble finding a definitive answer on how to do it when searching the web. Most of the info that I did trun up was for .NET 1 and I needed a solution for ASP.NET 2.0. I was finally able to get it working with some help and here is what needs to be done.
//Get the connection string
ConnectionStringSettings connectionString = ConfigurationManager.ConnectionStrings["myConnection"];
//Create the connection
SqlConnection connection = new SqlConnection(connectionString.ConnectionString);
Now that you have the connection you can use it however you wish.

In order for this to work I had to add the following using statement and refrence.
using System.Configuration;

Thursday, July 06, 2006

Package load failures

Today I encountered a problem where I was unable to successfully complete the SSIS Import Export Wizard and I arrived at the conclusion that it was due to a package load failure in VisualStudio. I assumed this because none of the items would appear in the toolbox for this type of project and when attempting to Reset All Settings through the Import and Export Settings Wizard I got a package load failure. I was able to resolve the problems with VS by following the steps outlined on Aaron Stebner's WebLog. This site was very helpful.

After that was done I also had to reinstall SQL Tools to have the Business Intelligence Projects be available in VS again. I was unable to do that because I still had the CTP installed and the release version would not proceed with the installation. It happened because the previous uninstaller for VS removed the entry in the Add / Remove programs window but left the actual proggram on the system. So I found a post called Cannot Install SQL Server 2005 on MSDN Forums with an answer to resolve the issue and the solution involved removing the CTP by using the Windows Installer Cleanup Utility. I was then able to continue installing the final release of SQL.

Wednesday, July 05, 2006

Trim a string after a full word

This is some code I wrote to trim a string to the last full word after 100 characters.

if (item.Copy.Length > 100)
{
//This line gets the index of the first space starting after 100 chars
//It then cuts the string at that point and adds "..."
item.Copy = item.Copy.Substring(0, item.Copy.IndexOf(" ", 100)) + "...";
}

First post

I created this blog more or less to archive things that I learn or find interesting on the net and I may want to look at again one day. I hope someone may find something I post useful as well.

-Brandon