title: Java memory hsqldb
body: <p>I am making a discord bot using Java, and I use hsqldb for a memory database, but it doesn't work fine for me, i insert data into the table and the result set next time gives 0 rows. the most confusing point is that it worked before in another feature in the bot</p>
  <p><strong>Code</strong></p>
  <pre><code>String statement = &quot;SELECT * FROM waiting_rolls WHERE user=&quot; + sender.getIdLong() + &quot; AND channel=&quot; + channel.getIdLong() + &quot;&quot;;
          System.out.println(statement);
          PreparedStatement p1 = conn.prepareStatement(&quot;SELECT * FROM waiting_rolls WHERE user='&quot; + sender.getIdLong() + &quot;' AND channel='&quot; + channel.getIdLong() + &quot;'&quot;);
          p1.execute();
          ResultSet r1 = p1.executeQuery();
          if (!r1.next()) {
              System.out.println(&quot;INSERT INTO waiting_rolls (user, channel, isWaiting) VALUES (&quot; + sender.getIdLong() + &quot;, &quot; + channel.getIdLong() + &quot;, 'true')&quot;);
              PreparedStatement p2 = conn.prepareStatement(&quot;INSERT INTO waiting_rolls (user, channel, isWaiting) VALUES (&quot; + sender.getIdLong() + &quot;, &quot; + channel.getIdLong() + &quot;, 'true')&quot;);
              p2.execute();
              EmbedBuilder embed = new EmbedBuilder();
              embed.setColor(Color.cyan);
              embed.setTitle(&quot;Create roll&quot;);
              embed.setDescription(&quot;Please insert your first value in the roll.&quot;);
              e.getChannel().sendMessage(embed.build()).queue();
          }
  </code></pre>
  <p>I know that the first reply will be use <code>p1.setLong</code> but I did this and one in the SQL support server do this for debugging, and they both don't work</p>
  <p><strong>Query that created table</strong></p>
  <pre><code>CREATE TABLE waiting_rolls (channel Bigint, user Bigint, isWaiting varchar(50), lastOutput Bigint)
  </code></pre>