|
-
Mar 3rd, 2015, 12:19 PM
#2
Re: Moving through database records
I'm not quite sure what the question is. Is the code you showed actually working? It doesn't seem like it should be, because the first line seems kind of improbable. For example, txtStudentNumber sure looks like it must be a textbox, since you use the .Text property later on. So, that would mean you are checking whether or not a control (not the contents of the control, but the control itself) is Null. Can that EVER be true?
You then appear to be using a strongly typed dataset. That would be unfortunate for a class, since those tend to leave the whole database activity sealed in a black box, but I guess that depends on the nature of the class. However, what is it you are trying to do? That looks like something of a search statement, though you don't do anything if a match is found. The subject line suggests that you then want to navigate around rather than searching, so are you trying to go from one row to the next within a datatable in the dataset?
My usual boring signature: Nothing
 
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|