I want some Moore

Blog about stuff and things and stuff. Mostly about SQL server and .Net
posts - 219, comments - 2287, trackbacks - 33

My Links

Advertisement

News

Hi! My name is 
Mladen Prajdić  I'm from Slovenia and I'm currently working as a .Net (C#) and SQL Server developer.

I also speak at local user group meetings and conferences like SQLBits and NT Conference
Welcome to my blog.
SQL Server MVP

My Books

SQL Server MVP Deep Dives 2
The Red Gate Guide to SQL Server Team based Development Free e-book

My Blog Feed via Email
Follow MladenPrajdic on Twitter


Users Online: who's online

Article Categories

Archives

Post Categories

Cool software

Other Blogs

Other stuff

SQL stuff

January 2007 Blog Posts

A little ADO.NET 2.0 detail that's REALLY TICKING ME OFF!!!

If you're reading this blog you're probably familiar with ADO.Net and it's SqlCommand object. Now this SqlCommand object has a CommandTimeout property that specifies the number of seconds after which the command will terminate. The default value is 30.   Now we get to the SqlConnection and the connection string. in the connection string you can specify Connection Timeout = numberOfSeconds after which the connection timeouts.   We also have to set the SqlConnection object to the SqlCommand.Connection property. Nothing special so far.   Now my question is: If we set the Connection Timeout in our connection string to higher value than the SqlCommand.CommandTimeout's is, WHY DOESN'T the SqlCommand.CommandTimeout get set to that higher...

posted @ Wednesday, January 31, 2007 6:42 PM | Feedback (9) | Filed Under [ .Net ]

Math geek humor

A derivative is walking down the street and sees a hot function. So he grabs her, takes her into the bushes and differentiates her once. Little later he sees another function and differentiates her twice. He goes on an sees this super hot function. really sexy. So he grabs her and differentiates her once and nothing, differentiates her second time, still nothing. After 10 unsuccessfull differentiations he gets tired and asks the function: "How come i can't differentiate you???!???" And the function answers: "HA!! That because i'm ex !!!" and beats the crap out the derivative.

posted @ Monday, January 22, 2007 10:10 AM | Feedback (6) | Filed Under [ Misc ]

Running a master db residing stored procedure in current database context

I recently wanted to create a stored procedure that would be only in master database and get some information_schema stuff for the current database. One requirement is that the sproc has s "sp_" prefix. I also thought that it's the only requirement. I was wrong not for the first nor the last time. The sproc would always return me information schema data belonging to the master db. The second thing you have to do is mark the sproc a system object. In Sql Server 2000 we have to set the system marking to on with master.dbo.sp_MS_upd_sysobj_category In Sql Server 2005 we have the sys.sp_MS_marksystemobject...

posted @ Thursday, January 18, 2007 5:25 PM | Feedback (29) | Filed Under [ SQL Server ]

Why do we need a [Flags] attribute on enums?

Enums are a great tool. They give meaning to meaningless numbers. I love using them as flags since it couldn't be simpler. So i always used the [Flags] attribute on my enums But why do we need that attribute? You can bitwise non [Flags]'d enums just the same. The difference lies in the Enum.ToString() method. If your enum has the [Flags] attribute set then the ToString() will return a CSV separated list of bitwised enum values. If there's no [Flags] attribute ToString() will return a number for every bitwised value.   As always it's best ilustrated with an example:[Flags] enum StateWithFlags { ...

posted @ Friday, January 12, 2007 5:40 PM | Feedback (11) | Filed Under [ .Net ]

Pop up a DIV tag over the Select tag is finally fixed in IE7 in FF 2.x

A SELECT tag is what a DropDowList in Asp.Net renders to in HTML and it's a standard web control.   If you ever had to pop up a DIV over it (a menu in most cases) then you know that in IE6 and below and FireFox 1.x  the select tag showed over the div tag. This was/is annoying as hell. There was a hack for this by putting an IFrame into a DIV but this introduced problems with linking etc...   Now FINALLY this is fixed in IE7 and FireFox 2.x.   I'm glad! Aren't you? :)

posted @ Wednesday, January 10, 2007 11:21 PM | Feedback (6) | Filed Under [ .Net ]

RFC 1925 - The Twelve Networking Truths - a must read

This document is a must read for any serious network admin and i do dare to say also for a DBA. .Net developers are welcome to read it since it is usefull.   A few excerpts: (1) It Has To Work. (3) With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it         could be dangerous sitting under them as they fly overhead. (4) Some things in life can never be fully appreciated nor understood unless experienced firsthand. Some things in networking can never be fully...

posted @ Wednesday, January 03, 2007 6:55 PM | Feedback (13) | Filed Under [ Misc ]

Powered by:
Powered By Subtext Powered By ASP.NET