title: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: account)
body: <p>i know this question maybe have repeated several times, but i couldn't find a real answer to this problem
  &quot; so i want to connect sqlite database to Java application , I am using Intellij and using sqlite-jdbc-3.34.0 as external library
  I am trying to read from the database &quot;account&quot; using select.
  and got this error in different placses</p>
  <pre><code>
    org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (no such table: account)
      at org.sqlite.core.DB.newSQLException(DB.java:1012)
      at org.sqlite.core.DB.newSQLException(DB.java:1024)
      at org.sqlite.core.DB.throwex(DB.java:989)
      at org.sqlite.core.NativeDB.prepare_utf8(Native Method)
      at org.sqlite.core.NativeDB.prepare(NativeDB.java:134)
      at org.sqlite.core.DB.prepare(DB.java:257)
      at org.sqlite.core.CorePreparedStatement.&lt;init&gt;(CorePreparedStatement.java:45)
      at org.sqlite.jdbc3.JDBC3PreparedStatement.&lt;init&gt;(JDBC3PreparedStatement.java:30)
      at org.sqlite.jdbc4.JDBC4PreparedStatement.&lt;init&gt;(JDBC4PreparedStatement.java:25)
      at org.sqlite.jdbc4.JDBC4Connection.prepareStatement(JDBC4Connection.java:35)
      at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:241)
      at org.sqlite.jdbc3.JDBC3Connection.prepareStatement(JDBC3Connection.java:205)
      at Test.main(Test.java:35)
  </code></pre>
  <p>I tried a lot of methods to solve it but couldn't, If you plz can help me.</p>
  <pre><code>import org.sqlite.SQLiteConfig;
  import org.sqlite.SQLiteDataSource;
  
  import java.sql.Connection;
  import java.sql.PreparedStatement;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  public class Test {
      public static void main(String[] args) {
          try {
              Class.forName(&quot;org.sqlite.JDBC&quot;); 
              SQLiteConfig config = new SQLiteConfig();
              config.setPragma(SQLiteConfig.Pragma.FOREIGN_KEYS, &quot;on&quot;);
  
              SQLiteDataSource dataSource = new SQLiteDataSource(config); 
  
  dataSource.setUrl(&quot;jdbc:sqlite:C:\\Users\\USER\\Desktop\\SQLDATABASES\\sampleDatabases\\bankDB&quot;);
              Connection dbConn = dataSource.getConnection();
        
  
           
              String queryString = &quot;SELECT * FROM account &quot;;
              PreparedStatement statement = dbConn.prepareStatement(queryString);
        
              ResultSet result = statement.executeQuery();
              
              //print the header line
              System.out.println(&quot;account_no, account_id, balance&quot;);
              System.out.println(&quot;--------------------------------&quot;);
              //check if result has any rows
              while (result.next()) {
                 
                  String accountNo = result.getString(&quot;account_no&quot;); 
                  System.out.print(accountNo + &quot;, &quot;);
  
                  int accountID = result.getInt(&quot;account_id&quot;);
                  System.out.print(accountID + &quot;, &quot;);
  
                  int balance = result.getInt(&quot;balance&quot;);
                  System.out.println(balance);
              }
          } catch (ClassNotFoundException | SQLException ex) {
              Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
          }
  
  
      }
  }
  
  
  
  </code></pre>
  <p>I tried to put the .db3 file inside the src folder and tried to remove .idea folder, also Invalidate caches / restart , or updated Intellij and nothing of these worked !.</p>