Questions tagged as 'jdbc'

1
answer

Problems inserting an OBJ into a LIST

I'm doing a search using LIKE , MySQL with JSF . Whenever I enter the search result within a array to return to my JSF , array adds, but always overwrites items with the last inserted. My code...
asked by 23.11.2016 / 00:59
1
answer

How to capture more than one attribute from a foreign key?

I'm doing a Java-Desktop Vehicle Lease project. I am using MVC, DAO and JDBC. In my bank I have the Rental and Car tables: CREATE TABLE IF NOT EXISTS 'frota'.'carro' ( 'idcarro' INT(11) NOT NULL AUTO_INCREMENT, 'chassi' VARCHAR(45) NULL...
asked by 01.02.2017 / 16:13
1
answer

Why not insert in the database?

Why does not the following insertion code in the database work? The code arrives until Joption "has arrived!" private void btnCadastroActionPerformed(java.awt.event.ActionEvent evt) { String sql...
asked by 04.06.2016 / 03:36
1
answer

How to prevent me from recording the same movie again

I have this method: test method of the class loops of the package view public int teste(){ String selecao = cbFilmes.getSelectedItem().toString(); String[] campos_filmes = selecao.replace(" ","").split("-"); // suponho que...
asked by 25.10.2016 / 21:55
0
answers

Error connecting to SQLServer using JAVA JDBC

I'm using the sqlserver lib and my connection class is down here: public class conexao{ //sqlsever private static final String USUARIO2 = "usuario"; private static final String SENHA2 = "senha"; private static final String URL2 = "jdbc:...
asked by 26.04.2016 / 19:34
0
answers

Problems with encoding in java

I have a classic encoding problem, I did several tests, but nothing solved. The problem occurs only with data brought from the database in Sql Server, with the fixed text on the screen is working perfectly. I tried:    add in jsp:
asked by 14.03.2016 / 21:52
1
answer

Can I cancel a JDBC connection?

I'm using the following code in a Thread: try { Class.forName("org.postgresql.Driver"); DriverManager.setLoginTimeout(60); conexao = DriverManager.getConnection(url,usuario,senha);...
asked by 22.02.2016 / 14:06
1
answer

How to execute a .jar using java jdbc on another machine

I am a beginner in the java area, I made an application using the netbeans native database. I generate the file jar , and on the machine I made the application the jar executes normally, but when I put this jar on another machine it...
asked by 17.02.2016 / 14:07
0
answers

Popular comboBox through a query in the database

I know I'm doing the wrong way to populate my comboBox, I'm doing this on the client side rather than doing server side is that java is not my beach. I'm trying to pop up my comboBox as follows: But from the error can not find symbol class c...
asked by 12.12.2015 / 00:34
1
answer

Why a Stored Procedure generates different results if executed in Workbench and Java with JDBC

I have a Stored Procedure in MySQL that is working normally when I run from the Workbench, but when I execute this same procedure in Java / JBDC I am getting erroneous values different from those obtained in the Workbench. My Stored Procedure...
asked by 07.10.2015 / 21:07