Life, the Universe and the Internet

My ramblings about making a living on the internet and life in general

Archive for June, 2007


British Hotels Still In The Dark Ages And My Total Dependence On The Internet

With this contract I am doing I have started to stay in hotels near the location a few nights a week, to take away the stress of so much driving (Three Hours A Day). So I assumed that it would be no problem to find a hotel with a wi-fi internet connection so that I could do some work at night. I was even happy to pay for the connection if necessary.

Four weeks in and I have yet to find a hotel that I can plug into the internet from my room. Well actually I could have one, if I am prepared to pay £95 a night for a bed and a couple of dried up sausages with a blob of beans in the morning. I cannot believe that so many hotels in the UK are so behind the times, come on guys, it takes nothing to install broadband and get some wifi hubs in, I mean you can even make a profit on it if you want.

But the other thing that shocked me, is my utter dependence on the internet to do some work. I take online access so much for granted now then when it is taking away it is a real problem. I cannot get access to so many things, not just my sites, but my email, my blog, a lot of contacts through MSN and Skype etc. I get a real feeling of being cut off, and I also find it a little disturbing that I am now so dependent on getting the internet. So I have started to think of ways that I can do more of my work offline. Although I am also now looking at some mobile devices like PDA’s, Blackberries etc, so that I could at least get my email if nothing else.

Would be interested to hear others comments on this, how do you cope with those periods when you are totally offline, how do you still manage to run your online business?

Write A Guest Post Here And Get Yourself Some Free Promotion And Backlink

With the contract I am doing, I find myself temporarily with very little free time and as a result the blogging is suffering. But rather than let the blog go stale, I thought I would offer you reading this a chance to write a guest blog post if your interested.

I am looking for posts on related subjects to any of my categories which I will list at the end of the post. I am not going to place restrictions on length of post, I just ask that it is on topic, informative and well written.

In return you can put a backlink in the post from this PR 4 site, and you can use any anchor text of your choice for the link. So if you fancy a little bit of extra promotion for your own site(s) then feel free to get in touch, either by commenting here or emailing me at steve@nospamdeadlydog.com (remove the word nospam for it to work).

Looking forward to hearing from you.

Categories:

SQL Server 2005: Selecting Records From One Table That Do Not Exist In Another

This week I learned a handy little piece of sequel, which even though you probably already now about, I thought I would share it as I had not seen it before.

The Scenario

Say you had two tables, for example a customer table and an orders table. The tables were structured so that whenever an order was placed it was related to a particular customer through the ID. Pretty straightforward so far right? Well now say you wanted a list of all customers that have never had an order placed against them, so therefore no records will exist in the orders table.

Now I was going to approach this by doing all sorts of complicated outer joins, but then someone should be a much neater solution, it is the NOT IN clause which I had not come across before. So you basically say show me all records where table1’s ID is NOT IN table2. Below is an example using the tables I already mentioned.

SELECT cu.CustomerName,
Cu.CustomerID
FROM dbo.Customers cu
WHERE Cu.CustomerID NOT IN
(SELECT CustomerID FROM dbo.Orders)

Pretty simple eh, and works like a charm. Hope this will be as helpful to someone out there as it was to me.

OnClientClick and Form Validation Controls

Yes, believe it or not I am going to write an on-topic post on my blog. Not only that but a programming post even, shocking I know. But I had a particular problem today and I thought the solution was worth sharing.

So I had a form, fairly simple form, a handful of textboxes and dropdown boxes and a submit button. I had some validation controls on there to ensure that the data was entered correctly and the form was working fine. I decided to add a confirmation message to the onclientlclick event of the submit button. You know the sort of thing, a popup button that says “Are you sure you want to perform this action” with an ok and cancel button. So I added the following code to the onclientlclick property of the button.

return confirm('Are you sure you want to perform this action?')

This had an unexpected result, when you click ok on the popup window, it ignored all of the form validation controls and submitted the form whatever was filled in. Well after much digging around google, I found the following solution. You need to wrap the javascript in an if statement and check the Page_ClientValidate property. So all you need to do is replace the code in the onclientlclick property with the following.

if (Page_ClientValidate()){return confirm('Are you sure you want to perform this action?')}

This now works perfectly, the popup doesn’t even appear unless all of the validation requirements have been met. A useful little piece of javascript I though, hope it will be of some use to you.