- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
The decision to make the system in VB.NET was made solely by the guy who was here before me. He was the only web developer then, just like I'm the only web developer now.
I want to convert the system over, but I never seem to have the time to do anything other than the mountains of text changes they give me. (Yes. Implementing a CMS is also one of my goals for the upcoming new version of the site.)
Admin
I'm going to take the rare opinion that the entire system is not screwed up. Certainly everything we se being done by this dev is. However, I would guess that the source database is pretty well locked down and that it contains data that the web server is not allowed to access directly (SOX or PCI anyone?) hence, the reason for this copy in the first place. I would also guess it is using a view to join multiple tables into records more easily managed by the web app, and to simultaneously hide PII or other sensitive data. It looks to me that at the very least they have joined to some sort of employee data - including ranks - and to payment information. I would bet they created views that are the only thing accessible to the user/role/account used to pull data from the source. I think that because someone with Gary's level of knowledge would never have heard of a view, let-alone successfully created one. I think they didn’t want Gary messing with their data (apparently with good reason) so they gave him some views and limited access.
To me, TRWTF seems to be that someone tasked a .Net dev who obviously knows next to nothing about SQL server with creating a process to move data from the source to the web-facing destination.
Admin
Admin
I guess that makes you look stupid. However, based on your comment record, I would bet* that you really aren't stupid. You do seem to be incredibly sarcastic, though.
*if the odds were right.
Admin
c'mon, you can think of something better than 'TRUNCATE TABLE'. :)
btw, TRUNCATE TABLE does not work on tables published for transactional replication. You have to do a DELETE.
Admin
Agreed. I think TRWTF is the fact that this code is doing a delete before populating data for what i'd imagine is a grid or some other view of the data. Concurrency is the real issue here, as what if you are viewing the data while another user fires a new view and deletes it all using the same routine?
I remember one of my first web apps declared a lot of data stuff as static objects. All went well in development/debugging until I realized multiple people accessing the web site were essentially accessing the same data objects and trampling over each other's fields/properties. Oops! :)
Admin
Admin
He already said he was a DBA...
Admin
L.A.S.T !
Admin
cONGRATZ...
Admin
He just removed quotes instead of escaping them?