C++.NET

Moderators: Lundin
Number of threads: 99
Number of posts: 163

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Use of ExecuteReader and ExecuteNonQuery in the same Application Posted by Ousel on 24 Oct 2009 at 6:01 AM
Hi,

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 "<program> 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.

Paul
Attachment: TestExec.cpp (3069 Bytes | downloaded 123 times)



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.