I’ll be honest that I was not much excited about Internet Explorer 8 until it went RTM. There is only so much beta software one can take. But today when IE8 went RTM I decided to install it on my main machine. This post talks about my first experience with the browser.
Installation of IE8 is one of the best I’ve ever seen. The thing installed itself in less than 2 minutes. Good on you Microsoft. It did ask me to restart my machine and I happily obliged. After the restart I fired up the browser and was presented with a Set Up Windows Internet Explorer 8 wizard. Here are the screenshots from that wizard. BTW: I run Windows 2008 Server on my main machine as my workstation.
Next screen asked me if I wanted IE to discover websites based on the sites I visit. Sure! Why not. The way this works is that Microsoft gathers data about the sites you browse and makes recommendations about similar sites. I usually turn such features off but just to see how it works I left it on. If it does a good job then I will leave it on forever. You can read the Internet Explorer Privacy Statement if you are concerned about what data will be collected. The Privacy Statement can be found here.
Next screen asked me if I’d like to use express settings or custom settings. I always choose custom settings so that I know what is being installed. After choosing custom settings and clicking on the Next button, the first screen allowed me to configure my search provider. I opted to keep my search provider.

After this I was asked if I wanted to download updates for search provider. What is this? I don’t understand so it’s a no.
Next screen is for accelerators. Accelerators are a new addition to Internet Explorer. Here is what help has to say about accelerators.
You can use Accelerators with text that you select on a webpage to perform such tasks as opening a street address in a mapping website or looking up the dictionary definition for a word. You can also choose the web services or websites that Accelerators use to handle different types of tasks. Internet Explorer 8 comes with a selection of Accelerators included by default, but you can add or remove them as you like.
I decided to keep my current accelerators.
Then I was asked about SmartScreen Filters. Turning this on means that some websites addresses will be sent to Microsoft where they can be checked for being malicious, fraudulent types. Because I do not go to any such sites, I decided to turn this off.
Next screen was about Compatibility Settings. Turning this on will make sites designed for older browsers look better (whatever that means) in IE8. Because I want to see how old sites look in IE8 in their raw form, I decided to turn this off. Of course this can be turned on at anytime.
And that’s about it. I clicked on the Finish button and I was all ready to browse the World Wide Web. The first site I opened in IE8 is One .Net Way. Just typing one in the address bar presented me with a history of sites I have visited with the word “one” in them.
Right away I was impressed by the performance. Drop down on address bar with my history items was very fast.
Overall experience of upgrading to Internet Explorer 8 has been good. I can’t say that I am disappointed with anything so far. I am sure that Microsoft has put in tremendous effort to get it right and more so because of the competition in the browser market. My overall gut feel about IE 8 is good. I’ll be using it a bit more and I will post anything I find interesting.
Finally here is a screenshot of One .Net Way in Internet Explorer 8.

To find out the space used by a table we can use sp_spaceused procedure. Most of the times sp_spaceused will give correct information. Why do I say most of the time? Well consider this example. I just inserted a large amount of data in Orders table in Northwind database and ran sp_spaceused.
EXEC sp_spaceused 'Orders'
which returns this result
![]()
But if I run sp_spaceused with true for its second parameter which is updateusage
EXEC sp_spaceused 'Orders', TRUE
I get the following result
![]()
Notice the difference in reserved space and index size. What has happened here is that by passing in true for updateusage SQL Server automatically runs DBCC UPDATEUSAGE which corrects any inaccuracies in catalog views. So it is a good idea to run sp_spaceused by supplying true for updateusage parameter if you absolutely must get accurate information. And especially after inserting large amounts of data.
Every object in SQL Server database has an Object Id which is used extensively by SQL Server for most operations. There are times when we would like to know what the object ID is for a particular object. In this example I will show you two ways to retrieve Object Id. My examples will retrieve Object Id for HumanResources.Employee table in AdventureWorks database.
Method 1
First method is to query sys.objects system view and pass in the name of object and also the name of schema.
SELECT OBJECT_ID FROM sys.objects WHERE name = 'Employee' AND SCHEMA_ID = (SELECT SCHEMA_ID FROM sys.schemas WHERE name = 'HumanResources')
This query returns the Object Id shown below.
Method 2
While the first approach works, there is a better way to get the Object ID and that is to use the OBJECT_ID function. Here is another query which fetches the Object ID for HumanResources.Employee table in AdventureWorkds database.
SELECT OBJECT_ID(N'HumanResources.Employee')
And as expected I get my result.
Both approaches are valid. However there are subtle differences. For example method 1 returns the result set in which the column is called ‘OBJECT_ID’, method 2 does not name the column. Another difference is that if you mistype the object name them method 1 will return zero rows while method 2 will simply return a NULL value.
In this walkthrough I will show you how to use Red Gate SQL Data Generator to generate test data for a database. While writing software which interacts with a database developers often write scripts to insert some data. Usually this data is not big enough to find performance bottlenecks and/or issues with presenting data on UI. An application may work well under the load of dev data and possibly test data but becomes a different beast when run against proper production data. So the question is how do you get some real looking data. There are two options; one you can ask your friendly DBA to give it to you, second you can generate your own data which mimics production data at-least in size. In this post I will deal with the second. I will show you how easy it is to generate good quality test data.
As a disclaimer I’d like to say that Red Gate did not pay for this post in any form. I installed a 14 day trial of Red Gate SQL Data Generator and I liked the tool.
Creating SQL Data Generator Project
SQL Data Generator works with projects which are .sqlgen files. The project file stores settings such as database you are generating data for and few other settings such as should Insert Triggers be fired. A project can be created by clicking on the New Project button on the toolbar which brings this dialog
You can specify the database server and the database name here. For this walkthrough I will generate data for Northwind database. After supplying database values click OK and it will import schema information from database.
The main windows displays the tables for which data will be generated. You can exclude tables by clicking on the checkbox.
On the right side of the window you can set the number of rows to be generated, what should be done when data is invalid and you can choose if existing data should be deleted.
For this example let’s set number of rows to be 100,000 for customer table and do the same for few other tables. I think that is a good number to do some testing.
Clicking Generate Data button on the toolbar presents this dialog which presents a summary of actions which will be taken.
Once the data is generated successfully a report is presented which shows the number of rows inserted for tables.
A quick query on Northwind database in SSMS shows a sample of newly inserted data.
And that’s how easy it is to generate data which can be used for load testing, and finding performance bottlenecks while developing an application.
Ok, so you’ve seen Windows Presentation Foundation (WPF) and you thought the technology looked interesting. You know your applications are starting to look dated, you understand WPF has matured, now in its 3rd release; but life gets in the way and you haven’t had the chance to get down and dirty with it yet. So here’s your opportunity to skill up, and raise money for the Red Cross Bushfire Appeal, in this One-Day Workshop!!
To help you get to grips with this great technology quickly, Microsoft has created a series of Hands on Labs and Presentations. These will grow your skill set, putting you on the path to building the rich user interfaces your customers are demanding.
This training event comes to you courtesy of the .NET User Groups across Australia, and Cliftons, who are generously providing their training facilities at minimal cost. This is your chance to learn new skills, network with other professionals, and have a bit of fun along the way.
Registration and Payment
There is a nominal charge of $100. With the help of Cliftons we are keeping costs minimal and if we fill all workshops across the country then this event will raise close to $23,000 for the Red Cross “Victorian Bushfire Appeal 2009”.
Places are limited and to register interest follow this link.
Workshop Format
To make it easy for you to attend we are running the workshops on a Saturday in all major cities. The sessions will commence at 8.30am with registration. Check the schedule below for the date and location in Sydney.
Following a 10 to 15 minute introduction to each topic, you will kick start Visual Studio 2008 and Expression Blend and work on the relevant lab!! Regardless of your current level of experience, you can work at your own pace; a facilitator will be on hand to guide your learning; and you’ll be able to take the lab content home for further learning.
Content
The WPF Skills day will cover
- Creating layouts, compositions and templates
- Building custom controls
- Working with Styles and control templates (includes using Expression Blend to restyle)
- Using the Ribbon control to effortlessly create applications that are as familiar to your customers as Office 2007 (not to mention the Windows 7 Core Applications)
- Working with the new DataGrid control to display tabular and editable data
- Binding data with ease to your user interface
- And more…
Event Dates
The Windows Presentation Foundation Community workshop in Sydney is to be held on Saturday, April 4th, 2009 at Cliftons on George Street.
Be in to Win
The workshop will also feature a prize draw to win a copy of Visual Studio 2008. Nice!!
To register for the even please follow this link.
This script returns all default constraints on a table in a SQL Server 2008 database. It gives me the name and definition of the constraints on Person.Address table in Adventure Works database. You can substitute the table name with any other table to get the constraints for that table.
SELECT [name], [definition] FROM sys.default_constraints WHERE parent_object_id = (SELECT OBJECT_ID FROM sys.tables WHERE name = 'Address')

In this post I will document my experience of installing Oracle SOA Suite on Windows XP. No I am not switching and I’m still a Microsoft developer by heart. But I do feel that for me to improve my craft I must also understand how things are done in other camps such as Oracle, SUN, IBM etc.
The version I installed is Oracle Application Server SOA Suite 10.1.3.1.10 and I decided to do a basic installation which installs Oracle Lite database as opposed to a full blown Oracle database. You can think of Oracle Lite as similar to SQL Server Express.
Installation can be started by clicking setup.exe after extracting all files form the downloaded zip. Setup.exe will conduct a quick check to see that right amount of disk space is available. After this the installation wizard starts.
Screen 1
This screen allows me to make a choice between a Basic Install or Advance Install and supply a name for my Oracle Application Server and passwords for admin account. Note that you cannot change the admin user name and database type will be Oracle OLite. Next thing is to click on Install button.

Screen 2
The wizard at this stage will happily go and install the software. This screen shows that my installation is at 74%.
Error Mesage
At almost 99% the installer may throw an error.
I just clicked okay few times and the error went away. The installer continued fine after that.
Screen 3
This screen shows that the installer is configuring required components which are required for applications in the suite.
Screen 4
This final screen tells me that the installation was successful. Hurray!
After clicking exit, the start page for Oracle Suite appears.
Conclusion
Overall experience of installing Oracle SOA Suite on WindowsXP is pleasant. The installer other than a minor hitch does a good job without nagging you with too many questions.
Now that I have the suite installed, I’ll play with it a bit more and post my learning experiences here.
You can download Oracle SOA Suite for Windows here.
.NET Framework provides classes which give information about the machine on which code is executed. One Such class is System.Environment which gives us things like Machine Name, OS Version and much more. I recently had a requirement to programmatically detect the number of Processors on a machine. I thought this was a simple enough task. System.Environment.ProcessorCount gives me that information. But I was in for a surprise. Let me walk you through my findings.
On my machine I have a dual core CPU which I can quickly see by opening Task Manager.

What do you think is the output of this statement.
Console.WriteLine(System.Environment.ProcessorCount.ToString());
The output is 2. But I have one physical processor so I expected to see 1. I could not find a way to get this information from the framework. So I went to good old WMI for this. Running this code gives me accurate information about my processor.
ManagementObjectSearcher mgmtObjects =
new ManagementObjectSearcher("Select * from Win32_ComputerSystem"); foreach (var item in mgmtObjects.Get()) { Console.WriteLine("Number Of Processors - " +
item["NumberOfProcessors"]); Console.WriteLine("Number Of Logical Processors - " +
item["NumberOfLogicalProcessors"]);
}
And the output this time is
Number Of Processors – 1
Number Of Logical Processors – 2
This is exactly what I need.
So here is my lesson learned. To get detailed and accurate information about number of processors on your machine, WMI is a better approach than System.Environment.ProcessorCount.
This snippet shows you how to get information about all CD / DVD drives on your machine using WMI and C#. To run the code you need to add reference to System.Management.
ManagementObjectSearcher mgmtObjects =
new ManagementObjectSearcher("Select * from Win32_CDROMDrive"); foreach (var item in mgmtObjects.Get()) { Console.WriteLine("Drive Letter - \t" + item["Drive"]); Console.WriteLine("Name - \t" + item["Name"]); }
This code snippet will print out the letter and the name of all CD or DVD drives on a machine. Here is the output on my PC.

This query returns the last row from Sales.Customer table in Adventure Works database. I am using LINQPad to write and execute my query.
(from c in Customers
select c)
.OrderByDescending(x=> x.CustomerID).First()
Here is the result as displayed in LINQPad
Microsoft Thrive is a clever demonstration of how Silverlight can be used for a public facing website. Other than being a showcase for Silverlight the site also has some valuable content for career development, desktop optimization, cost savings and compliance & governance among others.
The most fun is a game called Are You Certifiable. The game is a good distraction if you are In Pursuit of Certification. You have fun and still learn something.
In the game you will spot some long-gone Microsoft celebrities who make their appearance as avatars.
You can play Are You Certifiable here.
Top Posts
- LINQ To SQL Tutorial
- LINQ To SQL Join On Multiple Conditions
- Code Sample: Programmatically Download File Using C#
- Windows 7 Control Panel In Classic Mode
- More Details Emerge On Microsoft Master Certification
- Use SqlConnection With LINQ To SQL
- Free Icons And Images With Visual Studio 2008
- Capture XML In WCF Service
- Dynamic Sort With LINQ
- StyleCop Tutorial
Tags
.Net 2010 ADO.NET ASP.NET Azure Blogging Books Browsers C# Certification Cloud Computing Code Snippets Community Data Services Eclipse Entity Framework Google IDE Java LINQ Mac Microsoft Museum NetBeans Office Oracle REST SharePoint Silverlight SQL Server T-SQL Tips Tools Training Visual Studio Visual Studio 2010 WCF Web Windows Windows 7 Windows Forms Windows Live WMI WPF XAML

