Use of ExecuteReader and ExecuteNonQuery in the same Application


I am trying to develop a console application that uses ExecuteReader to accces selected entries from one table and depending on the contents of each row insert an entry to a second table using ExecuteNonQuery.

Unfortunately the program abends with a pop-up window stateing that the " has stopped working" on the insert function.

If the reader is closed before the insert than it works but only one row can be processed.

I have attached a test program to show the basic structure of the requirement.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!