UP Computer Science Interns' Blog

May 10, 2010

Hocus Pocus

Filed under: newsim_200702004 — ayne07 @ 10:13 pm

After three weeks of my training, programming in VB.NET wasn’t all Greek to me at all, but I must admit that there are some parts in my code, especially the declaration of web form objects, that for me are magically being generated by the IDE that I use. I’m not a big fan of IDE and I prefer using notepad++ as my editor. IDE makes the programmer’s life easy but I feel like it also makes me difficult to understand why I got some error when it is not me who declared those things.

For instance, there is this part in out project (the issuance part) where the user adds an item to be issued and he can preview these items to a table where he can confirm the transaction. For this, I thought of using VB.NET’s data set and data grid where I will temporarily put these items and only pass its content to the database right after the user confirms the transaction. However, it didn’t go exactly as I wished to. Every time I try to add a new item, it is not appended to the last row of the table, instead it is placed over the previous item. I thought that maybe, when I clicked the “add” button and then the page reloaded, my code created a new instance of dataset, losing all the previous data it had. I checked the Sub page_load in my code. I did not put anything regarding with my dataset there. I also declared my dataset as a global variable. Then I thought maybe I initialized it incorrectly. I called Sir Marvin and asked him if i did something wrong with my initialization but he said nothing’s wrong with my code. He also had the same problem before. He said that’s really how the dataset’s table behaves. He then just advised me to create another table in my database where I can place the data from the transaction. I have actually thought of doing that earlier but I saw some disadvantages of doing that so I tried to go the other way. But since I can’t use the first plan I just followed Sir Marvin’s advice.


Create a free website or blog at WordPress.com.

%d bloggers like this: