1/24/2007

ADO.NET ADO.NET TableAdapters and SQL Server Application Roles

I wonder how MS envisage to implement Application Roles in SQL Server and be able to use TableAdapters at the same time.

To make this work, you need to set the application role right after connecting to the database and unset it before closing the connection, otherwise connection pooling does not work.

I would have done this with the SQLClient.SQLConnection object if it had been extensible, unfortunately it is a sealed class (why?!?).

So now, instead of just using the table adapters as they are generated, I need to write a wrapper class for each table adapter, containing a wrapper method again for each data retrieval/update method, which will create a connection, open it, set the application role, then execute the original method, then unset the role and close the connection again.

This does not appear to me like a good design. Maybe you can think of a better way of achieving this, a more generic approach?

And finally, since Application Roles are a key concept of SQL Server, couldn't the connection object support it, or even better - why don't we just specify the application role in the connection string?

Any ideas are greatly appreciated!

1/23/2007

Pedestrian Traffic Lights in Germany

Please consider the "map" below. Let's assume that you want to cross the one-way street.

| |
| |
| |
| |
| | TRAFFIC
| | LIGHT
-------------------------+ +-----------------------------


<--- ONE WAY --- -------------------------+ +----------------------------- | | | | | | | | | | | | | | | |

This being a situation in Germany, the circumstances are pretty special: the traffic light for the cars driving on the one-way street shows red. The traffic light for the pedestrians wanting to cross the same street also shows red.
Now you'd probably start wondering what car could possibly hit you if you crossed the street anyway. People here apparently don't do that. They just stand there waiting for the light to become green. It eventually does so, when the cars coming from the left also have a red light, but that's a long wait.
Not only do Germans wait at traffic lights even if there is no car coming (you can observe this behaviour on deserted streets at night), they also wait for traffic lights that obviously have been programmed by someone who suffered from a sever hangover when he did it!

Workplace Toilets

Do you have the same situation at your work place? At 6am our toilets are clean, at 9am they do not look very inviting any longer and after 1pm they are just revolting. And one toilet is only shared by approx. 30 people here.

I thought how I could possibly make them clean up after themselves, as they do at home (OK, that's just an assumption). The first sign that I came up with read
Please leave the toilet as you found it!

Did not work! Probably it was too hard for people to just scrape off their remainders but leave out the ones that had been there before? So I thought of an improved sign:
Please leave the toilet as you would wish to find it!

Well, guess what, this did not work either. I guess different people want to find toilets in different states. So I further improved it to read
Please leave the toilet as the next person would like to find it!

Nah, did not work either. The level of empathy required for this was too high.
So what now? Should I go for the plain old "Clean up after yourself!"? Should I maybe just display a picture of a clean toilet and tell people to leave it exactly as displayed? This is probably the safest bet ... Ideas are welcome!

1/19/2007

Deutsche Telekom Business Practices

On the web site of Deutsche Telekom you can find a whole lot of special offers. I almost wanted to go for one of them, which includes a flat rate for phone calls within Germany, landline, excluding of course mobile phones and special service numbers.

The I found a footnote in very, very small print stating that some "special" numbers would also be charged. Before calling any number you would be able call the Telekom Hotline (for free after all) to ask whether a specific number belongs to these.

So I started wondering what these "special" numbers might be, and sent an inquiry to Deutsche Telekom. This was two weeks agon and I still have no answer - I guess I won't get any. Luckily I know someone who works for them, so I asked him and he was quick to answer: these numbers are all landline connections what do not belong to Deutsche Telekom, meaning that you have to pay for the call as soon as you try to call someone who is at one of their competitors.

To me this seems to be quite unethical. I for my part will not take their special offer.

It seems that even they are ashamed to admit it, that's why they do not clearly state this as part of their offer, and also why I never got a reply to my question.
adaxas Web Directory