0
1. No there is no simpler way than this. It doesn't seem very complicated to me. This is the simplest and yet the worst for two reasons.
a) It's insecure - the string concatenation directly from the controls' properties without validation makes the code vulnerable to SQL injection attacks. (google for "SQL injection" to learn more if you haven't already - this is an important issue)
b) Bad performance - if you pass parameters as parameters, not hardcoded in the sql statement I guess that oracle will use some optimizations. Do it like this(the example is for MS Sql data provider but I guess you get the idea):
SqlCommand cmdAddComment = new SqlCommand( @"
INSERT INTO WorkerActivityComments( CommentID, UserID, CategoryID, CommentDate, CommentText )
VALUES( @CommentID, @WorkerID, @CategoryID, @CommentDate, @CommentText)");
cmdAddComment.Parameters.Add( "@CommentID", SqlDbType.Int ).Value = TakeNumber.GetID( "Comments" );
cmdAddComment.Parameters.Add( "@WorkerID", SqlDbType.Int ).Value = userID;
cmdAddComment.Parameters.Add( "@CategoryID", SqlDbType.Int ).Value = catID;
cmdAddComment.Parameters.Add( "@CommentDate", SqlDbType.DateTime ).Value = DateTime.Now;
2. I have no idea, never used oracle. I've only heard of these sequences and how good it would be if we had them in MS Sql Server ;-)
3. I guess that ComboBox.SelectedValue shoud do the work
I hope some of this can help
