SQL Server: Find tables containing column name

To find all the user tables that contain a particular column name run the following command on the relevant database:

SELECT name FROM sysobjects WHERE xtype='U' and id IN( SELECT id FROM syscolumns
WHERE name like '%COLUMN NAME%' )

Gateway Quiz- The Results

The quiz went incredibly well on Tuesday night and we raised a grand total of £430.

I’ll admit to being pretty nervous before the start as it was a pretty miserable night as well as Belfast’s Christmas tree light switch on. I needn’t have worried though as around 60-70 people showed up to give their support and we had a great night together.

Once again I want to call out the generosity of the local businesses who donated to our ballot especially at their busiest time of year and to Carrick Sailing Club who hosted the event for us.

Doing anything on Tuesday (24th November) night?

My youth club Carrickfergus Junior Gateway is holding a fund-raising pub quiz at Carrick Sailing Club on Tuesday 24th November. All are welcome to attend and ticket prices are £3 each with maximum team sizes of 5 people. The quiz starts at 8pm and I would love to see you there.

In other youth club related news we currently have places available for membership to the club. More details can be found on the site or by contacting me directly.

Developer Workshop: MVC and Visual Studio 2010

I had the pleasure of attending a workshop by Scott Guthrie this week where he discussed the MVC (Model, View, Controller) design pattern within asp.net and the new additions to the .net framework coming with the release of C# 4.0 and Visual Studio 2010.

The first session on MVC raced by and before anyone in the audience had noticed two hours had passed by. The content was aimed at people who had never seen the MVC pattern before and brought us from a brief definition through to creating a full website. One of the highlights of this pattern for me was the ability to fully control the html output of the site as well as applying validation to the Model layer of the site and having that carry through to all aspects of the application including client side validation.

The second session focused on the soon to be released .net 4.0 framework and Visual Studio 2010. There are a lot of really interesting features being released not least the inclusion of jquery and a lot of editor improvements. An audible gasp went up from the audience when Scott demoed a new multiline selection and editing feature.

Overall it was a fantastic workshop to hear of new approaches to application development and something that I believe we will hear a lot more of..

The two sessions were videoed and I believe will be available from the Channel 9 website soon. In the meantime here’s videos from the Netherlands branch of the tour:

http://channel9.msdn.com/posts/matthijs/Scott-Guthrie-ASPNET-MVC-2/

http://channel9.msdn.com/posts/matthijs/Scott-Guthrie-Visual-Studio-2010-and-NET-Framework-40/

K2 Blackpearl: Goto Activity

When Goto doesn’t go when you want it to

When working with server side events I have found it common to reroute the workflow to a different activity within the workflow. Perhaps a user has decided to end the workflow and I want to send them to an End Workflow activity first. I would normally use the following code to do this:

K2.GotoActivity("NameOfActivity"); 

However to my surprise instead of the workflow moving to straight to that activity what actually happens is that the pointer linking the end of the current activity to the next changes to point to the activity entered in the GotoActivity code above. This means that if you have additional server events and potentially client events within the activity listed below the code containing the Goto they will still be processed leading to all sorts of errors further down the line.

The solution for me was to set a flag once the Goto had been called to skip out any further code execution. Messy but safer than allowing the code to execute. One to watch out for in your own code.

Our Deepest Fear

Our deepest fear is not that we are inadequate.
Our deepest fear is that we are powerful beyond measure.

It is our light, not our darkness, that most frightens us.
We ask ourselves, Who am I to be brilliant,
gorgeous, handsome, talented and fabulous?

Actually, who are you not to be?
You are a child of God.

Your playing small does not serve the world.
There is nothing enlightened about shrinking
so that other people won’t feel insecure around you.
We are all meant to shine, as children do.

We were born to make manifest the glory of God within us.
It is not just in some; it is in everyone.

And, as we let our own light shine, we consciously give
other people permission to do the same.
As we are liberated from our fear,
our presence automatically liberates others.

http://www.squidoo.com/our_deepest_fear

Almost 50 pointless questions

1. What time did you get up this morning?
1pm. Off work so had a good lie in

2. How do you like your steak? Currently well done but would be up for trying something more medium

3. What was the last film you saw at the cinema? Ice Age 3. Very funny

4. What is your favorite TV show? 24, BSG. Most Sci Fi shows

5. What did you have for breakfast? Went all out this morning with a bagel with bacon, egg and tomato. Yummy!

6. What was your maiden name if married or middle name if not? Middle name is Louise

7. What is your favorite cuisine? Probably chinese

8. What foods do you dislike? Mushy peas

9. Favorite dressing? Honey mustard or balsamic vinger

10. What kind of vehicle do you drive? Skoda Fabia

11. What are your favorite clothes? jeans & t-shirt

12. If you could go anywhere in the world on vacation, where would it be? Japan for the cherry blossom

13. Cup 1/2 empty or 1/2 full? If you poured it from empty then half full. If you’re draining it then half empty :-)

15. Favorite time of day? Early evening

16. Where were you born? Belfast, N Ireland

17. What is your favorite sport to watch? Swimming

18. Who do you think will not tag you back? Not worried

19. Person you expect to tag you back first? Not worried

20. Pepsi or Coke? Neither. What is with a vegetable extract drink? Fanta or tea anytime

21. Bird watcher? Only the ones in my back garden

22. Are you a morning person or a night person? Night

23. Do you have any pets? Yep, one cat

24. Any new and exciting news you’d like to share? Heading to Australia in October for 4 weeks

25. What is your best childhood memory? Lots

26. Are you a cat person or a dog person? Cats

27. Beer or Margarita? More a couple of glasses of wine person

28. Always wear your seat belt? Of course

29. Been in a car accident? Yeah. Luckily not serious

30. Favorite Restaurant? Molly’s Yard, Windrose

31. Favorite Pizza Toppings? cajun chicken

32. Favorite Flower? Daffodils

33. Favorite ice cream? Melon

34. Favorite fast food restaurant? Chinese food

35. How many times did you fail your driver’s test? Passed on second go

36. From whom did you get your last email? Facebook notification

37. Which store would you choose to max out your credit card? Waterstones

38. Bedtime? Usually around midnight. Need to start going earlier

39. Who are you most curious about their responses to this? Don’t mind

40. Cucumber or tomato? Tomato- more versatile

41. What was your favorite vacation? Florida with family

43. What are you listening to right now? Magic fm power ballads

44. What is your favorite color? blue

45. How many tattoos do you have? none

46. How many are you tagging for this quiz? none

47. What time did you finish this quiz? midnight

48. Coffee drinker? Tea all the way

49. Favourite concert? James Blunt

50. Current Crush? Not telling!

Anyone else care to share?

K2 Mail Event Hyperlinks

I had a situation where I needed to email a user from within the workflow process using a mail event with a dynamically built url generated from a stringtable entry detailing the start of a url and a datafield value containing a reference id in the email body. I found that no matter what way I concatenated the two values together or added href anchor tags to the body of the email, the email would be received showing the link but without it formatting itself as a hyperlink.

The resolution to this was to concatenate the values together along with the html tags in a server side code event and store this value in a datafield before the mail event item was reached.

The code ended up being:

K2.ProcessInstance.DataFields["Hyperlink"].Value =
string.Format("<a href=\"{0}{1}\">{0}{1}</a>", K2.StringTable["UrlString"],
 K2.ProcessInstance.DataFields["Identifier"].Value);

Hope this helps someone else out there.

Moo Cards

After seeing Andrea’s mini Moo cards at DeveloperDeveloperDeveloper the other week I decided that I needed to get some personal business cards done up and went for Moo’s mini card range.

The idea behind them is that you can have up to six lines of text for your personal details and choose various pictures for the card backs either from a range created by various designers or from a photostream on Flickr. I must admit I had great fun in selecting and cropping various pictures to use on my own cards.

For the personal details side I finally decided on including my name, phone number, email, website and twitter address. Most of the people that I will ever hand them out to will be online and if they ever need my postal address they can easily request it. Twitter name was an interesting one for me to include as I’ve only been using the service for a few months but has already become a keystone in my communications so it was a must to include.

The cards arrived this morning and I’m completely delighted with them. The card quality and print clarity is incredible and I’m really glad that I went with them. They’re already causing a stir to everyone that sees them and lots of people on twitter are already asking to see pictures, and no I haven’t been paid to write this post- just one happy customer.

 

Moo Cards

4 Weeks, 2 IT Conferences- April’s going to be busy

DeveloperDeveloperDeveloper Belfast- 4th April 

DeveloperDeveloperDeveloper! Day – Belfast- Saturday April 4th 2009! This FREE developer event brings DDD to Belfast! If you were unable to go to Microsoft TechEd, Microsoft PDC or conferences such as DevWeek, DDD is for you! There will be NO Microsoft speakers presenting, just speakers from the .NET developer community; although we will have many of the Irish Developer Platform Evangelists (DPEs) on hand to help out and chat to attendees.The day is put together by the community for the community, in other words you. We thank our sponsors who have helped make the event possible: Microsoft have graciously sponsored the event! 

More information and registration at: http://www.developerdeveloperdeveloper.com/belfast 

 Agenda

Time

Room 1

Room 2

Room 3

08:45 – 09:20

Registration

09:25 – 09:30

Welcome – Housekeeping

09:30 – 10:30

To MVC or Not to MVC, that is the Question
Dave Sussman

A lap around Microsoft Dynamic Data
Cathal Connolly

Inversion of Control and Testability
Paul Cowan

10:30 – 10:40

Changeover

10:40 – 11:40

Asp.net MVC best practices
Sebastien Lambla

Creating extendable applications using MEF
Ben Hall

DDD, SOA, Messaging, Architecture
Udi Dahan

11:40 – 12:00

Changeover

12:00 – 13:00

Customizing ASP.NET MVC Framework
Chris Canal

Azure to WPF – What’s good in .NET 4 and Visual Studio 2010 
Alex Mackey

Everything you Wanted to Know About Refactoring but Were Afraid to Ask
Gary Short

13:00 – 14:30

Lunch

14:30 – 15:30

An Inrtoduction to Monorail(MVC) and the Castle Project
Andrea Magnorsky

A Sneak Peek at the Editing Code in VS2010
Martin Woodward

What is Functional Programming?
Barry Carr

15:30 – 15:40

Changeover

15:40 – 16:40

jQuery Deep Dive
Andy Gibson

A peek at Silverlight 3
Chris Hay

Indexing in SQL Server
Niall Flanagan

16:40 – 17:00

Final wrap-up and close

 

 —————————————————————————————————-

Barcamp- 25th April 

BarCamp Belfast is a user-generated unconference for designers, developers, startups and geeks to share and learn in an open environment. It’s taking place on the 25th April 2009 in The Black Box, Belfast. 

Speakers- More to come

Teens & T’Internet — How to understand and deal with Under 18s on the internet, how to market to them etc. (not to be taken seriously!)

— Enda Crowley (@endac)

What’s your phone number? — A talk about social networks, social engineering, simplicity, and grassroots action.

— Blaine Cook (@blaine)

Something about WordPress — Something about using WordPress :)

— Lee Munroe (@leemunroe)

MySQL Replication — Scaling your app using MySQL replication for redundancy & capacity . Replication Topology, sever roles, hints, tricks, tips & gotchas.

— Simon McCartney (@simonmcc)

Niche Social Networks — How to Make Millions (or maybe just a living…) from a Niche Social Network.

— Michelle Gallen (@michellegallen)

Not sure yet — Probably my microcontroller modded, with wifi frankenstein coffee roaster

— Andrew Gribben (@grib)

MatchMedia — An insight into ‘The Digital Visualisation of Competitive Sport’ a product currently in development. Philip Wilson (the products inventor) will give a view of the product, the progress being made, the partners already involved and any potential collaboration opportunities.

— Philip Wilson (@internetsense)

Engaging In Social Media — How brands are using social media (in particular Bebo) to engage with their audience

— Philip Macartney (@fubar7676)

Competitive advantage and the web — How what makes companies is changing, and what this means for you!

— Paul McKeever (@paulmckeever)

Adventures in building a web app — Short talk on experiences building a real time Javascript app atop Google AppEngine, and/or focus on application performance and why it’s of prime importance.

— David Wilson

Educating Standards — Bootstrapping web design education for the benefits of the creative community by creatively colliding the ivory towers of academia with the messy trenches of industry.

       Christopher Murphy (@fehler)

 More information and registration: http://www.barcampbelfast.com/