79262439

Date: 2024-12-08 12:28:04
Score: 1.5
Natty:
Report link

I finally solved the problem the day after I posted the problem.n the MSSQLConnection and SQLite classes I didn't pass the context from class to an other, As @CommonsWare mentioned the context was null. So in class MSSQLConnection i had to add the below line:

public MSSQLConnection(Context context){
    this.context = context;
    **this.SQLQueries=new SQLQueries(context);**
} 

and in SQLite class:

public  SQLite(Context context) {
    super(context, DATABASE_NAME, null, DB_Version);
    **this.context = context;**
    **this.mssqlConnection = new MSSQLConnection(context);**  
} 

and in SQLQueries class i had to remove this line

connectionSQL = new MSSQLConnection(context);
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @CommonsWare
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: NoobGeorge