Questions tagged as 'jdbc'

1
answer

Java Connection mySQL JDBC

I have a problem following this class video : I seem to follow what he says to do but the line goes red and with errors: con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/videoAulaJDBC", "root", ""); The error that happens are...
asked by 22.06.2016 / 17:03
1
answer

Problem reading properties file

I created a propertie file for the bank to read this file from there but the console gives me the following error: Erronull\properties\conexao.propertie (O sistema não pode encontrar o caminho especificado) Erronull\properties\conexao.properti...
asked by 08.06.2015 / 14:28
2
answers

Error connecting to MySQL database in Java

Connection code: package br.bent.jdbc; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Connection; public class Conexao { private static Conexao conexao; public static Conexao getInstance(){ if...
asked by 06.07.2015 / 05:13
1
answer

Offline database [duplicate]

I am creating a program that uses a database on file. I was told that SQLite is for this, I can create database with it and access per file. In the case then would I use the SQL or JDBC library to connect to this database? Does SQL already com...
asked by 26.08.2014 / 19:29
1
answer

How to list more than one row of the bank in a Listview using JDBC?

How to list more than 1 database data using JDBC in a ListView on Android? I have in a user 13 rows, and I would like to retrieve the 13 and not only 1. Below the code I use: import android.os.Bundle; import android.view...
asked by 02.11.2014 / 17:30
0
answers

Error in database insertion using JDBC

So guys, I'm trying to insert into a table (My database is using 3 tables), and for some reason in the stores_products table the insert is not performed. Here is the error:    t com.mysql.cj.jdbc.exceptions.SQLError.createSQLException (SQLErr...
asked by 14.11.2018 / 22:28
0
answers

MySQL - default-file path mysql does not match the path of the file my.cnf

When I access the database mysql -u userAdmin -p --help I get the following client variable data: Asyoucanseemostofthevariableshavenodefaultvalue.Ialsohaveaccesstothefilesthatarebeingusedtoreadthevaluesofsuchvariables. Sincemymy.cnffile...
asked by 20.11.2018 / 08:06
0
answers

Syntax error in Java JDBC MySql

I have a syntax error here in the mySql query inside the Java code in the repository. The error is both in the ALTER method and in the EXCLUDE method. package com.leporonitech.agenda.repositorios.impl; import java.io.IOException; import java....
asked by 31.10.2018 / 19:40
0
answers

KeyHolder.getKey () may return null - Spring Boot JdbcTemplate

I'm starting Spring and I'm doing a method that will insert a new row into a database table and this method will return the% new% that was generated by the Bank, I'm doing this: public Profissional insert(Profissional profissional) { Prepa...
asked by 06.10.2018 / 00:16
1
answer

Return from database values

I have two variables: Int id; String Produto; I want to fill in the variable "id" with the corresponding "product" value. The data is collected directly from the bank. public static void main(String[]args){ connectionBancoDados con =...
asked by 28.06.2018 / 16:56