Apr 11

I’ve been really slow in making a first post but I thought I would post this code snippet as it seems to be something I’m using quite a lot at the moment. It is for building xml from a database:

System.Xml.XmlDocument xmldoc = new System.Xml.XmlDocument();
xmldoc.LoadXml("");
System.Xml.XmlElement root = xmldoc.DocumentElement;
try
{
SqlConnection conn = new SqlConnection(connectionstring);
conn.Open();
SqlCommand cmd = conn.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = sqlSelectStatement;
using (SqlDataReader dr = cmd.ExecuteReader())
{
// Process rows
while (dr.Read())
{
System.Xml.XmlElement row = xmldoc.CreateElement("row");
for(int i=0;i
{
System.Xml.XmlElement el = xmldoc.CreateElement(dr.GetName(i));
if(!dr.IsDBNull(i))
{
el.InnerText = dr.GetValue(i).ToString();
}
row.AppendChild(el);
}
root.AppendChild(row);
}
}
conn.Close();
}
catch(){}

There is another way of doing it directly into xml using cmd.ExecuteXmlReader and putting ” for xml auto” on the end of your sql select statement but apparently this only works in sqlserver 200 or higher and it puts all the fields as attributes of a node with the name of the table and no root node which I didn’t like, personal choice.

I’m sure this has its problems, let me know you think

May 1
Bloody diets
icon1 sam sinfield | icon2 Diet | icon4 05 1st, 2007| icon34 Comments »

I seem to spend most of my life on one kind of diet or another and never seem to lose any weight.

‘Eat less, exercise more’ is what the general consensus seems to be. I’ve been trying this for the last few weeks and am yet to lose weight. I go to the gym for an hour and a half every other day and work really hard and also go jogging for at least half an hour every other day. I’m down to a calorie count of about 700/day. I would have thought it a physical impossibility, but I’ve only lost about 1 pound!! I’ve tried just about every diet and am yet to find one that really works.

The next one I’m going to try is the lemonade diet. This is a temporary ‘fast’ over about 10 days. I’m still waiting for the book (another bloody book!) to arrive in the post but it basically looks like you just live off mineral water and fresh lemon juice, cayenne peppers(???) and some kind of laxative tea. Sounds repulsive and no doubt I’ll starve but this is apparently the diet that Beyonce went on for 2 weeks and lost 22lbs!! I’ll try it for 10 days, the only problem is fitting the fast into my life so I don’t miss out on my valuable weekend time off from the kids when I have to go out and get drunk.

I’ve got half a weekend off this weekend and a whole weekend off next weekend so the fast will have to wait until after then. I’ll post before and after weights but there is no way I’m posting before and after photos, not having my flab shown on t’internet.

May 14
Changes
icon1 sam sinfield | icon2 Work | icon4 05 14th, 2007| icon310 Comments »

The past few weeks have seen a lot of changes at Karova. We’ve said goodbye to 2 colleagues, both of whom have been here for a long time and will be greatly missed.

Phil has decided to move back home to Ireland, and who can blame him. I’d choose Dublin over Shotton any day.

Jay has decided to bite the bullet and do what most of us only dream about while we’re sat in the office. He has packed in everything and is off traveling the world, though not all of it, just the Australia bit.

Life at Karova will not be the same without Phil and Jay. It takes me much longer to do anything without having Phil to help me debug my code, but then I get more done without having Jay telling us his latest conspiracy theory. 2 absolutely top blokes that I have had the pleasure of working with and winning money off at our poker tournaments. Good luck guys.

We’ve also welcomed 2 new people, Debs, who I’ve had the pleasure of working with previously in SecureTrading and is absolutely great. I’m glad she has decided to join us here at Karova, and Sam (another Sam), who is a developer with a lot of experience. So welcome Debs and Sam to our Karova family. We hope that you love it here as much as the rest of us do

May 21
Master Cleanse - Day 1
icon1 sam sinfield | icon2 Diet | icon4 05 21st, 2007| icon31 Comment »

As I mentioned in a previous post, I’ve now started the master cleanse, not the full-on cleanse though as I actually have to leave the house and go to work so I’ve decided to leave off the laxative tea and saltwater flush for the first few days and only do that at the weekend, I think the half hour drive to work would be too difficult!

Why?

I’ve decided to do this one for the detox more than anything. For the past few weeks, I’ve been feeling very low, physically and emotionally. I’ve had an ongoing cold for nearly 3 weeks and I’ve been filling myself with loads of junk and alcohol. My brain feels kinda numb and I’m finding it hard to focus. I’ve reached a point where I think I can’t go on feeling like this. I need to flush out my system completely. The master cleanse seems extreme but I think it’s just what I need.

The Start

Ok, here’s the stats, the real ones:

  • Height: 5ft5
  • Weight: 10st 1lb
  • Chest: 32inches
  • Waist: 29inches
  • Hips: 39inches

Ideally, I’d like to lose about half a stone and a couple of inches off everywhere would be nice, realistically, I don’t think that’s going to happen in 10 days. I will take ‘before’ photo’s tonight and I’ll take ‘after’ photo’s and if there’s a noticeable difference, I will post them, maybe.

Day 1

It’s not too bad at the moment. I don’t eat breakfast anyway, so I haven’t really noticed any difference until now. Now it’s lunchtime and I’m getting hungry. Having a glass of the homemade lemonade does take the edge off the hunger but it’s not very nice and I’m having to force it down. I think maybe I’ve put too much Cayenne Pepper in it. It’s a bit hot! I think it’ll be a couple of days before I notice any real difference in how I’m feeling. This better bloody make me feel better. I’ll be well pissed off drinking this crap for 10 days if it doesn’t.

May 22
Master Cleanse - Day 2
icon1 sam sinfield | icon2 Diet | icon4 05 22nd, 2007| icon3No Comments »

This is much easier than I though it was going to be. I don’t actually feel hungry. Every time I start getting hungry, around meal times, I just have another glass of the lemonade and the hunger, surprisingly goes. I’m actually starting to enjoy the lemonade.

I even tried the saltwater flush this morning. It says in the book ( Lose Weight, Have More Energy & Be Happier in 10 Days: Take Charge of Your Health with the Master Cleanse by Peter Glickman) that you have to drink a quart of it. I had no idea what a quart was and to my horror it’s 2 pints. 2 pints of warm saltwater. Totally gross. I bought it into work with me and went and drank it in the loo’s. Part of it came back up after gagging several times trying to drink it. I never managed the last quarter of a pint.

I’m not feeling any different, my cold which was getting noticably better, has taken a turn for the worse, but still isn’t too bad, and my head still feels like its full of cotton wool. So I don’t feel any better, but I don’t really feel any worse either.

I do feel lighter though which is always good. I was 141lbs 2 days ago before I started this and now I’m 4 lbs lighter, I know it’s only water, but I’ve tried loads of diets and never dropped that much weight before in a week, never mind a couple of days. It is definitely giving me the urge to carry on.

May 24
Master Cleanse - Day 4
icon1 sam sinfield | icon2 Diet | icon4 05 24th, 2007| icon31 Comment »

Wow, day 4, I think this is now officially the longest I have been without food, and surprisingly, I’m still not hungry.

I was craving for food last night and I had the kids back after them being with their dad for the last few days. It was very hard not to pick when preparing their food.

I’m feeling quite good today. I still have the cold that I’ve not been able to get rid of for the last few weeks and when I woke up this morning my tonsils were slightly inflamed and sore but they’ve gone down and are now completely back to normal. My head feel like it is much clearer than it has been for a while but still not quite as clear as I would like it to be.
I managed the salt-water flush this morning without gagging. My stomach is so empty in the morning, the first pint goes down really easily. The effects of the saltwater flush are definitely not nice. It takes about 10 minutes for it to get through my system and then I’m on the toilet every 10 minutes for the next 2 hours.

I weighed myself last night and again, I haven’t lost anymore weight, still only 4 lbs down.

Took my measurements, and they’re still basically the same. I’ve lost an inch off my waist but that is likely to be due to the emptying of my digestive system.

Only 6 days to go.

May 25
Master Cleanse - Day 5
icon1 sam sinfield | icon2 Diet | icon4 05 25th, 2007| icon3No Comments »

Whoo hoo, half way. It has become like a mission now. I now haven’t eaten anything for 5 days. Only drank the detox lemonade and drunk saltwater.

I’ve lost another pound at the end of yesterday so i’m 5 pounds down in 4 days, pretty good going.

I actually feel quite good. I felt quite tired late last night which just means that i end up going to bed at a more reasonable hour. I felt tired getting up this morning, but that’s normal for me, any day.

My concentrate is 100% better, my head is much clearer, i find I’m more motivated doing things and getting stuff sorted.

Still got the cold, which just won’t shift, it’s now been about 3 weeks.

Not really having cravings for food now, however, I did find it difficult last night, as my mum had made my kids real chip with beans and sausages, It was very difficult not to pinch their chips. The guys at work are talking about getting pizza in for lunch. I’m not even tempted, but then it hasn’t arrived yet. There was talk about getting beer and I had to object. That’s one step too far. Cruel b*stards! They decided it wasn’t worth the risk getting beer.

Got the kids all weekend so I won’t be tempted into going out and drinking. Just have to refrain from picking at their food.

Only 5 days to go!

May 27
Master Cleanse - Day 6
icon1 sam sinfield | icon2 Diet | icon4 05 27th, 2007| icon31 Comment »

This has been the hardest day yet. It is the first day when I’ve been on the cleanse I’ve not been working so my routine is out of the window.

I feel quite tired and everything is quite a struggle. I’m finding it quite hard to move my muscles. I haven’t drank as much lemonade as I’m supposed to today. Only about 3 glasses instead of 6 so maybe that has something to do with it.

I started on the laxative tea last night but it didn’t seem to have any effect on me at all. Wasn’t what I expected.

I’m craving food and spending all day with the kids and feeding them without picking at their food was a real struggle.

I’m now 9st 8 so I’ve lost 8lbs. Haven’t really lost anything in inches though.

May 28
Master Cleanse - Day 8
icon1 sam sinfield | icon2 Diet | icon4 05 28th, 2007| icon31 Comment »

I didn’t blog yesterday cause I was busy all day and didn’t manage to get the time to sit down at the computer.

Today is the end of day 8 and still going strong. Only 2 days to go. This morning I weighted 9st 6, that’s a loss of 10lbs. My clothes are very lose and I haven’t been this weight since I was about 19. I’m going to be very upset putting it back on after the fast.

Yesterday was very difficult with the cravings. I took the kids to Macdonald’s drive through for an ice cream and got them a Caramel Deluxe MacFlurry each. I was drooling. It has taken every bit of my willpower to stick to this.

Today has been quite easy. I was very tired and achy this morning when i woke up but was feeling fine after 3 glasses of lemonade. I then went out for the afternoon and didn’t take any lemonade with me. By the time I got home, my joints were aching, my muscles were aching and I could hardly keep my eyes open. I struggled to walk up the stairs. After 2 glasses of lemonade, I was right as rain and got on with all the housework. I don’t know how people manage on a water only fast.

I have still got the cold and cough, it does seem a bit better but it would probably be like this if I wasn’t on the fast, so I don’t think the fast has made any difference to my ability to fight off infections.

My tongue is white. It cleared up on day 6 and was completely pink and for some strange reason, has turned white again. Hopefully it’ll clear again before day 10. Can’t wait to eat solid food again.

May 30
Master Cleanse - Day 9
icon1 sam sinfield | icon2 Diet | icon4 05 30th, 2007| icon33 Comments »

Well, day 9 already, only 1 more day to go.

My craving for food has gone (at the moment). I’m still 9stone 6 so I haven’t lost anymore weight, still 10 lbs lost. I haven’t got much maple syrup left so I’ve had to reduce my rations of lemonade to below the minimum recommended and I can feel it in my energy levels.

My head still feel very clear so it’s been worth doing it just for that. My sinuses are still full of crap. The throat feel like it’s getting better. I’m tired, my eyes feel a bit sore and my muscles ache a bit going up stairs. Considering the way i was feeling when I started this cleanse, I’m not feeling considerably different now. Just clearer headed, lighter and I feel kinda healthy, apart from the tiredness which is probably due to the reduction in lemonade.

I have stopped taking the laxative tea since i woke up at 3am and had extreme stomach cramps for about 15mins. I am still doing the salt water flushes though

« Previous Entries