Server Problem Resolved
29 January 2009 Personal
Web Hosting Uk Logo
Major problems on the server caused this site to function irratically. Hopefully the isssue has now been resolved and my site is now up and running. The problem was the result of a hard drive failure, but thankfully backup of all data was intact.
 
The guys at Web Hosting Uk technical support were great with their help and advice and I would thoroughly recommend the company to anyone considering a hosting company.
 
 
Fiat Coupe Refused To Start
13 January 2009 Personal
My Fiat Coupe
The car was running perfectly this morning when I took my daughter to the ice rink at 5.30am. It fired up first time and gave no indication of the trouble ahead.
 
Time to go home it's 7.30am and my daughter has to be ready for school. I turned the key in the ignition and my Fiat died. No matter how many times I turned the engine over, the car just would not start. First I thought ahha no petrol,  so I managed to get a lift to the nearest petrol station and arrived back at the ice rink with a  can of fuel. Again nothing. I checked the ignition fuse under the bonnet and that seemed to be ok.
 
Reluctantly I had to leave my fiat there and travelled home by bus. I phoned a friend and later in the morning we towed the car back home. I telephoned Power Italia Basildon and they advised that my car could be booked in for later this week, and suggested I look at the ignition fuse!
 
Turns out the problem was the fuel cut-off switch. All that was needed was for the switch to be reset. 
 
Should Websites Validate
10 January 2009 Personal
W3C Validation
Why are so many designers and developers ignoring W3C standards? The W3C created these standards so the Web would work better for everyone, and yet a majority of sites today still don't validate.
 
I was browsing through this months .net magazine and looking at the section at the beginning of the magazine called readers' sites a showcase for their best work. What a disappointment, all three sites advertised fail to validate.
 
It makes be laugh when I read that the designer or developer having 5 years, 8 years or even 10 years experience and the site they've developed having some 180 errors.
 
Problems at Technorati
09 January 2009 Personal
Technorati Logo
Problem at Technorati?
 
It appears like many others my site is no longer getting pinged.
 
Data Access Layer
08 January 2009 Tips
Bubble
Let’s first set up the database. Open Sql Server Management Studio Express and in the Object Explorer right click Databases >New Database. Choose a database name something like MyBlog. Leave Initial size and autogrowth at default. Drill down to your new database MyBlog in the Object Explorer on the left and right click Tables > New Table. Start filling in the column names and data types, starting off with EntryID with the datatype set at Integer. Set the EntryID as the primary key. In the properties dialogue box drill down till you see Identity Specification, expand and change Is Identity to Yes and set the Identity Increment to something like 4.
 
Next, back to the top in column name under EntryID enter Title with data type varchar(50) followed by Entry with data type text, Image with data type varchar(50) and finally Date with data type datetime. Make sure the Allow Nulls column is unchecked apart form the Image column. Save and close the table. Enter Entries as the name for the table.
 
Now let’s add some data to the table to get things moving along. Drill down to the MyBlog database expand tables and right click dbo.Entries > Open Table. Enter some data in the rows for example My first entry in the Title field, some Lorem Ipsum in the Entry field, the Image field Null and 01/01/200900:00:00 in the Date field. Repeat the exercise for a couple of more rows and save and close the table.
 
Ok, so now we have some data to work with. Open Visual Studio and select New Web Site and change the name from the default to something more appropriate like MyBlog. Next make sure you’re viewing the Server Explorer window, View > Server Explorer and expand Data Connections and drill down till you find "netsdk.MyBlog.dbo. Expand the MyBlog database and you will see your table Entries.
 
Open the solution explorer and right click App_Code and add new Folder naming the folder DAL. Next right click the DAL folder and choose Add New Item. From the list presented choose DataSet and change the name from DataSet1 to MyBlog. After a moment or two the TableAdapter Configuration wizard will open. Choose New Connection. In the Server name textbox type (Local)\NETSDK. Make sure select or enter a database name is selected  and from the drop down list choose the MyBlog database. Click OK > Next. When asked whether you want to save the connection string to the application configuration file make sure that the yes box is checked. Click Next.
 
In the Choose a Command Type dialogue box choose Use SQL statements, then click Next and enter SELECT * FROM Entries. In the Choose Methods to Generate dialogue box Fill a Data Table and Return a Data Table should both be checked. Change the method name GetData to something like GetEntries and click Next > Finish. If all went well you should now be looking at the Data Table in design view. Change the name of the Data Table from Data Table 1 to EntryPosts and making sure that Fill,GetEntries is highlighted right clik and choose Preview Data. Click onto the preview button and the results will be displayed. Click Close.
 
Open the default page and while in design view drag a Grid View control from the toolbox save the page. Now, go to the code behind of the Default page and select Page Events and the declaration Load. Enter the following code block under the Page_Load event:
 
Dim PostAdapter As New MyBlogTableAdapter.EntryPostsTableAdapter
GridView1.DataSource = PostAdapter.GetEntries
GridView1.DataBind()
 
Save and run the project and you should see data displayed on the Web page.