• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps issue in controlling SQL query execution

realmilan

Lurker
Aug 12, 2017
6
1
Hi there,

I hope to fine my solution here..

I am developing an app that retrieve data from SQL Server.
I have to execute 2 queries together to come out with result. The problem is the first query is a Stored Procedure that contain (INSERT INTO... EXEC sp_....), this query is shows error in server side but it is executed well, then the second query will read from the inserted result into it sue the first query.

The problem is, when the fist query execute, it make the App goes to Exception part witch not allow the second query to be executed.
Is there any way to make Android Studio ignore the error and execute the second query?
 
So what is the exception?
As I said previously, we need to see the stack trace from your Logcat.
This block of code will effectively stop you seeing the actual exception, so you should remove it, or re-throw the exception.

Code:
catch (Exception ex)
           {
               message = "Error";
           }
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones