August 29, 2005
Posted by Martin Kulov at 3:42 AM
August 07, 2005
Essential ASP.NET for the Web Developer from Fritz Onion
A Primer to Proper SQL Server Development from Kimberly Tripp
Posted by Martin Kulov at 1:57 AM
August 06, 2005
In one of the forms there is a grid that shows all rows from a table in the database. I assumed that in order to show a new row I only need to add it in the database table. Needless to say when I did add the row it did not show up in the grid. Well I was stumped. How was this possible? The grid was supposed to show all rows from the table. Somehow the newly added row did not make it on the screen.
There were two possible choices. First – not all the rows were read from the database. This was very easy to track using the wonderful SQL Profiler. If you ever have to deal with application that uses MS SQL and you are debugging some data related issue my advice is: always start debugging data with the SQL Profiler first. That’s not the case with Oracle but that’s another story. So I found that all my rows including the new one are actually returned to the client. Second choice – the grid was not showing all the rows because one or another reason. After half an hour digging through various properties and custom xml of the third party grid control I found out the problem. Because of the nature of the data there were two types of data in this particular data table. The ones with ID below zero were system rows and were not supposed to be showed in the grid. On the contrary side the rows with ID above zero are expected to show up. You may think that I have created my new rows with ID below zero, but you are wrong. The grid actually used a filer to display only the meaningful rows, but instead to filter the rows out by ID, it was filtering them by name. For example: Filter = "([Name] = 'john') OR ([Name] = 'mike')". I felt a little bit helpless.
In all the efforts, endless code reviews and test cases to deliver quality code, nothing can help you better than the willingness and the experience of the developer to produce quality and easy to maintain code.
Posted by Martin Kulov at 4:22 PM