How can I pass a parameter in an sql query without making it explicit in the query itself?

I’m testing my ignite cache, inserting a simple User in the cache and then through a query I get the User entered previously returned I have a problem writing the query. I noticed that writing like …

Remove Null from For loop of ArrayList

I am currently converting an ArrayList to a String to send it to a DB so I can retrieve it on the other end and convert it back to an ArrayList later. My thought process is to convert it to a string …

Query Java doesn’t execute

I’m trying to execute a query on eclipse at my Java program, but it always exit with a exception and don’t execute the query, I read a lot of posts here but no one of them could help me with this. …

SQL Grammar Exception in Spring Boot H2

I’v got a problem in my Spring Boot with H2 project. I got a get method for listing elements from the SQL table and the SQL command working. In the H2 database I can execute and see the results but I …

Select sqlite android

I have a query with a condition but it is returning an empty result even though I have the data that matches these conditions. I am a beginner, so I’m not sure if this query is correct. public Cursor …

Get previous months first and last date

I need to query last month data from a database. So I need the first and last date of previous month to be able to make the “between” SQL query. First date starts always from 1 of course, …

SQL query is only returning one entry, when it should be returning several

I am creating a book tagging system and I am trying to call all the books with the same tag. My query is only turning up the first book, and not any of the following books with the same tag. Here is …

Insert values into Database with Java

Hello I have a Jtable and a JFormattedTextField where I input the values to insert into the database. I used PreparedStatement but the output gives an error [SQL0418] Utilização de marcador de …

How to reset a session in a sql connection pool?

i have a connection pool using javax.sql.DataSource and PostgreSQL JDBC. The process is simple, I’m taking a virtual connection from connection pool, process it, then close the virtual connection (…

Custom cell button action to Download a file to the ‘downloads’ folder

so I have managed to build my custom cell which holds a button to download a file from my local database. somehow all seems fine but when i run and try to download, I get an sql error that there’s a …