title: UCanAccess: user lacks privilege or object not found
body: <p>I am trying to make some Ucanaccess practice to manage some database with java. And I am getting an error that I don't know how to solve.</p>
  <p>I have this table called USERS in access:</p>
  <p><a href="https://i.stack.imgur.com/7xhYE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7xhYE.png" alt="enter image description here" /></a></p>
  <p>Autonumber, Short Text, Short Text, Number.</p>
  <p>So what I am trying to do is to check if a given User and Password are correct, and if they are, then change &quot;CONEXIONES&quot;. But I am getting this error:</p>
  <blockquote>
  <p>Exception in thread &quot;main&quot; net.ucanaccess.jdbc.UcanaccessSQLException: UCAExc:::4.0.1 usuario no tiene privilegios suficientes o objeto no encontrado: Z_19MIKE95</p>
  <p>at net.ucanaccess.jdbc.UcanaccessStatement.executeUpdate(UcanaccessStatement.java:221)<br />
  at Ej4.Ej4.main(Ej4.java:32)</p>
  </blockquote>
  <p>That in English means:</p>
  <blockquote>
  <p>UCAExc:::4.0.1  user lacks of privileges or object not found Z_19MIKE95</p>
  </blockquote>
  <p>So my code is this:</p>
  <pre><code>    Class.forName(&quot;net.ucanaccess.jdbc.UcanaccessDriver&quot;);
      String url=&quot;jdbc:ucanaccess://C:/Users/PC-Mikel/Desktop/Uni/Distribuidos/P4Ejer4.accdb&quot;;
      Connection connection = DriverManager.getConnection(url);
      Statement statement = connection.createStatement();
      String sql,user,pass;
      System.out.println(&quot;Introduzca Usuario&quot;);
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      user = br.readLine();
      System.out.println(&quot;Introduzca Contraseña&quot;);
      BufferedReader br2 = new BufferedReader(new InputStreamReader(System.in));
      pass = br2.readLine();
      sql= &quot;UPDATE USERS SET CONEXIONES = 1 WHERE USUARIO = &quot;+user+&quot; AND CONTRASENA = &quot; +pass;
      System.out.println(sql);
      int nrows = statement.executeUpdate(sql);
  </code></pre>
  <p>The code continues but there are just some conditions and queries.</p>