When I connect Java to Mssql using JDBC ODBC driver
try
{
ps=conn.prepareStatement("UPDATE products SET stock=? WHERE id=?");
ps.setInt(1, prods.getStock());
ps.setInt(2, prods.getId());
int b = ps.executeUpdate();
if(b!=0)
{
System.out.println("success");
}
else
{
System.out.println("Fail");
}
}
catch(SQLException e)
{
System.out.println(e);
}
This catch block rises this exception
java.sql.SQLException [Microsoft] [ODBC SQL Server Driver]
[SQL Server] Invalid object name 'products'
I am working on this part from last 2 days. How I will solve this exception?