on 06-27-2018 12:10 PM
Hi,
does ASE Data Adapeter supports second SelectCommand.ExecuteReader() after execution been canceled, on the same object?
Thank you for answer.
Jakub Kremer
Thank you, yes i need to create new adapter to run the select again.
Also we are experiencing the Access Violation Exception
Do you have a idea what can be the issue?
Thanks. J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you call adapter.SelectCommand.Cancel() this will cause the next adapter.SelectCommand.ExecuteReader() to fail with exception:
"Operation Canceled."
AseDataAdapter adapter= new AseDataAdapter();
AseCommand cmd = new AseCommand("select a.au_lname from authors a, authors b, authors c, authors d", conn);
adapter= new AseDataAdapter(cmd);
adapter.SelectCommand.ExecuteReader();
System.Threading.Thread.Sleep(2000);
adapter.SelectCommand.Cancel();
System.Threading.Thread.Sleep(2000);
adapter.SelectCommand.ExecuteReader();
Regards,
Ryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.