Document Outline for Client Script in Visual Studio 2005

One feature I like most in Visual Studio 2003 is their Document Outline Panel. I usually abuse this feature on my JavaScript code to easily see and jump through my functions.

Continue reading ‘Document Outline for Client Script in Visual Studio 2005′

Import Yahoo! 360 Blog To WordPress

Before having my own domain for my blog, I was a huge fan of Yahoo! 360. I love its simplicity and its integration with other Yahoo services. But my enthusiasm slowly faded since Yahoo decides to pull the plug on Y360. Then I found WordPress and I fell in love again. Now my major problem is how do I migrate all my Y360 entries into WP? The most obvious solution is to manually copy all my Y360 entries and paste it to WP one by one. If your post has comments and tags, you should do the same if you want it completely “save” the entry. But what if you have over 50 entries in Y360 with more than 20 comments each? What a nightmare.
Continue reading ‘Import Yahoo! 360 Blog To WordPress’

Querying the Latest Record

It was my long standing problem when querying the latest history of a record. The scenario is that I have a parent table and its transaction log (say, history records) are stored in a child table linked by the parent’s primary key id. The parent table stores the main information regarding a transaction while the child table stores historical data of what happened in the parent’s table info.

parent-child relationship

Continue reading ‘Querying the Latest Record’

PHP: Cannot Modify Header Information

I downloaded a very cool theme for this blog and luckily, I successfully installed it in my local instance of WordPress. Satisfying the OC in me, I immediately do some minor twicking to further personalize my page. I tested the page’s comment engine, posting, plugin and widget capabilities but was repeatedly bombarded with this error every time I click a button that causes the page to reload:

Warning: Cannot modify header information - headers already sent by (output started at / my_site/wp-content/themes/new_theme/functions.php:2) in /my_site /wp-includes/pluggable.php on line 694

Continue reading ‘PHP: Cannot Modify Header Information’

Returning the ID of a Newly Created Row in Oracle’s PL-SQL

Having years of background developing applications using MSSQL Server as the database, I encountered a roadblock when my stored procedure is required to return the id for my newly created row in oracle.

Immediate Work-Around

Since all my tables have a timestamp field, the most obvious thing to do is to query the topmost row of my table sorted by the timestamp field. For added accuracy, I also filtered my query against the userid which created the affected row.

Continue reading ‘Returning the ID of a Newly Created Row in Oracle’s PL-SQL’

Tab AJAX Control Toolkit Style Problem

If you’ll ask all the ASP.Net developers on what control they want Microsoft to create and include freely, I bet that Tab Control is in the top 5 list. Well, now our dreams finally came true. With the released ASP.Net AJAX last January 2007, the ASP.Net AJAX Team included 4 new controls that are not in their RC1 and Tab Control is one of them (others are AutoComplete, Calendar, MaskedEdit).

Now I am currently involved in a web application development that is deeply in need of tab-based navigation to greatly improve the page’s user friendliness. We downloaded and installed that AJAXToolkit from ASP.Net site, plugged it in one of your page, provided it’s required and necessary properties saved the file and refreshed the page. Our fingers were crossed with be waited for the progress bar to reached it’s maximum length and after the page was rendered, this is what we saw.

Continue reading ‘Tab AJAX Control Toolkit Style Problem’

DataFormatString For DateTime Column

I was coding with breeze rendering my tabular data with the use of a GridView control. I successfully bound it to my ObjectDataSource and the data were displaying just fine except for one minute problem. My DateTime column was rendered as “raw” format from my SQL Server. This means that my date column displays “8/12/2006 11:47 AM”.

Using my experience from DataGrid control from my ASP.Net 1.1 days, I immediately set the value of my DateTime column’s DataFormatString property to “{0:d}” (short datetime format). I saved the page and refreshed the browser finding my DateTime column still displaying the same “raw” format. What seems to be the problem?

Continue reading ‘DataFormatString For DateTime Column’

Podcast Mania

I stumbled across Podcasting last year when I’m browsing on MSDN’s website and came across the DotNetRocks! page. I downloaded few of their episodes and immediately got hook by the show. That’s when I switched to iTunes as my primary music player for downloading a podcast is a breeze on that player.

Over the past months, I accumulated dozens of podcast episodes from different category. From the latest in technology, programming, movies, fashion, music, business, and humor. Here are some of the podcasts I’m currently listening and recommend:

Continue reading ‘Podcast Mania’

Dynamically number rows in a SELECT T-SQL statement (SQL Server 2000)

I encountered some TSQL Select problem where I want my result set to have a “number” on the first column. If for example you have a simple select statement

USE Northwind
SELECT CustomerID
, CompanyName
FROM Customers
ORDER BY CustomerID

which outputs

Continue reading ‘Dynamically number rows in a SELECT T-SQL statement (SQL Server 2000)’

Running Multiple Version of .Net Framework in IIS 6.0

Different versions of .Net framework can work side by side in a single web server (IIS). But after porting my finished project to the production server (IIS 6.0 running on Windows Server 2003), I got this error message:

I have projects made with .Net framework 1.1 and 1.0 working well side by side with my 2.0 web applications but migrating it to an IIS 6.0 made my app behave that way. What seems to be the problem?

After I searched MSDN and other technical blog, I came across Scott Forsyth’s Weblog article on running multiple versions of ASP.Net. I found out that IIS 6.0 handles running an application differently from it previous counterparts.

Continue reading ‘Running Multiple Version of .Net Framework in IIS 6.0′