Skip to main content

Readings in Evolution and Religious History

· One min read

Strange on the surface, but makes deep sense to me: currently reading Darwin's Origin of the Species, and also started reading Stories of Baha'u'llah and Some Notable Early Believers (Baha'u'llah is the prophet-founder of the Baha'i Faith). Social-scientific evolution gives us a Charles Darwin and social-religious evolution/God gives us the Manifestation of the Cause of God for today. One brought us a better understanding of the physical world, and the other a better understanding of the spiritual world — and its implications for how we live out our lives as sentient beings in that physical world. Its implications for how we live amongst each other, for how we treat that Nature, which Darwin so carefully analyzed and loved. For how we reconcile ourselves to the seeming pointlessness of the universe (dead link removed; SF 2025).

SSIS Crashes When Editing OLE DB Source

· One min read

Problem​

SSIS 2005 (actually, Microsoft SQL Server Business Intelligence Studio) crashes every time you click on an OLE DB Source to edit it. (there are probably similar errors for OLE DB destinations).

Solution​

oddly enough, synchronize a few DLLs:

Version of the assemblies msmdlocal.dll and Msmgdsrv.dll must be the same of the ones installed into "%ProgramFiles%\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\" and the ones installed into "%ProgramFiles%\Common Files\System\Ole DB" location.

If it is not same for any or both of these DLLs, then replace the ones in PrivateAssemblies with the ones from ole db.

Hat tip: Calculation tab not working — SQL Server 2005 Analysis Services

Securely Accessing Network Resources in an ASP.Net Web Service

· 2 min read

Problem​

You have an ASP.Net web service/site that needs to access network resources, and IIS is running in a service account that you do not want to have access to those resources.

Solution​

Create a custom network account and setup a separate application pool. Microsoft article How To: Create a Service Account for an ASP.NET 2.0 Application outlines some pros/cons and gives a few alternatives, as well as giving the basic instructions. However, I found that these instructions had to be modified with inclusion of a few extra security rules. Steps:

Closing A Cursor in SQL Catch

· One min read

Problem​

In a T-SQL script, an exception occurs while a cursor is open, resulting in the cursor never being closed. But, the exception handling wraps the entire script, not just the cursor, so there is no guarantee that the cursor will be open if/when the CATCH statement is reached.

Solution​

query the sys.syscursors view to see if the cursor(s) in question is still open:

Think For One ... Second

· One min read

What's wrong with this code? There are unnecessary lines. So? Why care about unnecessary lines? Because it shows that the programmer was not really thinking about what he was doing.

MyObject obj = someList.Find(delegate(MyObject test)
{
if (test.Id.Equals(packageId))
{
return true;
}
else
{
return false;
}
});

Unit Testing Functions That Call Microsoft Enterprise Logging

· 2 min read

Problem​

you have a method that logs a message using the Microsoft Patterns & Practices Enterprise Library Logging Block, and you would like to write an automated unit test for it in NUnit (or Team System — solution is easily adapted). Logging to a flat file doesn't work; the file is still open when you try to read it to verify that the message has been logged. Logging to the database doesn't work; it seems the log isn't written to the database immediately. And so forth. Is there an in-memory way of reading the logged message?

A Plurality of "Marriage"s

· 2 min read

The op-ed, Is My Marriage Gay? in the New York Times (5/11/09), describes the unusual state of affairs surrounding marriages where one partner has legally changed gender after the marriage was recognized by the state. The country is patchworked with statutes and laws that make such a marriage anywhere from fully recognized to partially tolerated to anathema. And this makes no sense to me, except in recognizing that people are afraid of what they do not know. Well, go hug a transgendered person today (in person or virtually if that's what it takes). Get to know her or him.

safnet logo