If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

[RESOLVED] Use a string as a command?

I have a table in my database called Grades which contains a set of columns (named column1, column2 and so forth) each containing different student grades (in the form of strings). In my C# application I would like to change these values through the webservice setGrade() method.

In future I will add more grade columns to the database but I do not want to have to change my code accordingly each time. I tried to write my code such that for each column that exists in the Database table Grades the value "Very good" is inserted. On debugging I am told that I can not use my string "temp" as a command on the webservice record "grade." Is there another way of doing this?

Re: Use a string as a command?

Oh ok, thanks, I wasnt sure if it was possible to change the code like that or not

It might be possible, but that doesn't necessarily mean it's the approach you should take.

Generally in database design, you don't want to have to make schema changes (like adding a column), whenever some common event occurs (like a new academic class being put on the schedule).

The approach where you add a new column for a class works okay for a small school, but it doesn't scale. Imagine a school with 1000 classes offered - it wouldn't be practical to have a table with 1000 or more columns.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.