Questions tagged as 'jdbc'

2
answers

How to access a Connection type variable from another claSe?

you can have a class from: Conection cn; cn=DriverManager.getConnection("jdbc:mysql://localhot:3306/BD","root","pass"); // and from another class, which is the one that inserts a record, call the connection variable "cn"? The idea is to...
asked by 15.06.2018 / 04:11
2
answers

Failed query to database

I'm trying to make a query to a car database and it does not work for me, the function where I do the query is this: public static ArrayList<Coche> filtradoAnuncios(String valor_marca, String valor_modelo, String valor_anyoDesde, String...
asked by 20.06.2018 / 15:34
1
answer

Label S: Select struts2 jdbc

Hi, I'm learning Struts2 , I'm doing a registration form but I have a question about how I can pull the records that are in a table to the s:select tag (I practically want to make a > combobox pulling data from a field in a sql table)....
asked by 30.05.2017 / 23:53
1
answer

execute query TOP 1, JDBC

I have an application on android that connects to a database through JDBC, and when making a query with top 1, I get the following error:    java.sql, SQLEXCEPTION: use of the execute query (String) method is not supported on this type of sta...
asked by 13.12.2016 / 03:03
2
answers

Error "PLS-00306: wrong number or types of arguments in call to 'TEST'" when invoking Java an Oracle function with parameters of type BOOLEAN

I'm trying to call an Oracle function from Java, and I get the following error message:    java.sql.SQLException: ORA-06550: line 1, column 13:   PLS-00306: wrong number or types of arguments in call to 'test'   ORA-06550: line 1, column 13...
asked by 26.01.2017 / 22:17
0
answers

JAAS JDBCRealm with JPA entities does not work

I want to use JAAS in my project, configuring a JDBCRealm through JPA entities. The authentication seems to work correctly, for example, I try to access facelet /admin/analysis.xhtml and redirect me to facet login.xhtml . When...
asked by 20.10.2016 / 22:50
2
answers

I miss the CRUD code

When I execute the code to make me delete, update, or addUser, I get a null error in some String, as a user or password. I show you my MySQL. SHOW CREATE TABLE 'curso'.'usuarios'; id, user, name, surname, email, password, type, course....
asked by 31.07.2016 / 01:55
1
answer

Delete query Java & Mysql

I am trying to remove a record from the database with the book code I pick up from a combo and from all its associated data tables using PrepareStatement but it is throwing me an error. I pass the code to you because surely it is not doin...
asked by 26.11.2016 / 01:33
1
answer

Difference between JDBC and JSON [closed]

My purpose is to connect to a remote data base (MySQL) from Android, make queries, create tables and those basic things. What is the difference between making a connection using the Java JDBC, and using PHP JSON or something like that? (Excus...
asked by 26.03.2017 / 03:47
1
answer

Error "SQLException: The flow has already been closed" when reading a field of type LONG

I make the following request from Java with JDBC to user_tab_columns : SELECT column_name, data_type, nullable, data_default, char_length, char_used FROM user_tab_columns WHERE table_name = 'mi_tabla' ORDER...
asked by 30.01.2017 / 17:43