I have a code in Android Studio that should send data to SQL Server:
connection= con.connectBD(getActivity());
ps=connection.prepareStatement("exec addLocal ?,?,?,?,?,?,?,?");
ps.setString(1,user);
ps.setNString(2,encodedImage);
ps.setNString(3,namelocal);
ps.setNString(4,selecteZone[0]);
ps.setNString(5,selectedCategory[0]);
ps.setNString(6,coment);
ps.setDouble(7,latitude);
ps.setDouble(8,longitude);
ps.executeQuery();
progressBar.setVisibility(View.GONE);
connection.close();
The query is created via a Stored Procedure :
This is my Table in SQL Server:
When this code is running the application closes and the logcat points out this error:
9-16 11: 29: 27.466 25108-25108 / com.example.julio.photogo E / UncaughtException: java.lang.AbstractMethodError at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.setNString (JtdsPreparedStatement.java:1351)