The other day I was writing unit tests for some legacy code and I needed to mock IDataReader. I really just wanted to populate the reader with a single row of data, then the Read() method should return false. Using Rhino.Mocks it was a piece of cake.
PLAIN TEXT
CODE:
IDataReader reader = MockRepository.GenerateStub<IDataReader>();
[...]
For various reasons, developers through the years have decided to store lists of data as comma-separated lists. Most programming languages include a split() function that allows you to break apart a list of data using a specified character. T-SQL does not.
I don't remember where I got this split function from. I know I didn't [...]
I've been getting our test environment in sync with our production environment the past week. Part of this effort involves moving database from our production environment to our test database server. The easiest way to do this is to put the production server into single-user mode, copy the .MDF and .LDF database files over to [...]
All of the latest Rails/Twitter performance bruhaha made me think about some advice I got a long time ago and that I dish out whenever someone asks me about some performance concerns they have with their code.
Nothing else matters once you hit the disk. Once you do any kind of activity that involves reading/writing to [...]
It's not good to hear your DBA 'guru' answer "Good question" when he's been working for 2 months creating insert and update DTS packages for your application and you ask him "How can you tell if you are supposed to insert or update a given record in the source table?".
Especially when NOT being able [...]
I deal mostly with medical data, some appointment data, but mostly data about a patients labs, medications, and what they are having taken out or put into them. These databases can get pretty big, right now I've got three main databases. One is about 1.5GB, the second is abou 2.3GB, and the third, which [...]