Skip to main content

All Questions

Tagged with
0 votes
0 answers
36 views

Get Foreign Key id of a table and make a list of the object ids assigned to it in a JComboBox

I want to the admin user to select an Id from a MySql database table and show an id list of the other columns that are assigned to the original Id that the person selected in a JComboBox and ...
Iann Schmith's user avatar
0 votes
2 answers
479 views

How to use ResultSet correctly? No operations allowed after statement closed

any idea how to improve this code to avoid the java.sql.SQLException: No operations allowed after statement closed. I can't understand where the error actually occurs, I guess after if (resultSet.next(...
Ricardo's user avatar
  • 15
0 votes
1 answer
55 views

How to "convert" ResultSet in a local variables without having it "plugged" to db? [duplicate]

when I get a ResultSet output, it is always "plugged" to db, so every time I use "resultset.next()" it actually do requests to db. I always thought that when I perform something ...
Allexj's user avatar
  • 1,507
1 vote
1 answer
272 views

java.sql.SQLException:with infinite loop [duplicate]

In my project "Student Attendance Management System" , after giving the subject name and number of roll nos present, my project start adding the "1" to the given subject infinitely,...
Belle's user avatar
  • 39
1 vote
1 answer
219 views

Transfer ResultSet from class A to class B in Java

I am programming on a LoginForm with a MySQL database in Java. It all works well and now I wanted to add permissions. If someone logs in, the data from a specific user will be inserted in a Resultset. ...
spinnning's user avatar
0 votes
1 answer
38 views

Not able to proceed with ResultSet

I have MySQL database having columns named with roomno, availability, clean_status, price and room_type. Column Availability has data as either 'available' or 'not available' and column clean_status ...
Mister Micron's user avatar
-4 votes
1 answer
162 views

ResultSet Handling in MySQL

I am working with MySQL and am writing a method, that takes a certain id (int) to search through a table to see if it exists. It then shall (if it exists) return the other Column entries, so that I ...
robin kemper's user avatar
3 votes
2 answers
829 views

How to get ResulSet multiple values into Java objects

I have 2 tables Person (Person_id, name) and Address(Address_id, Person_idAd, addressName) with relation of one-to-many. With the following query I get String query = "SELECT Person_id, ...
Cameron121341's user avatar
0 votes
0 answers
254 views

JDBC ResultSet - Many To Many

Greeting to all, As I'm learning Java, JDBC and MySQL I reach one point where I would like to perform the following I have 2 entites class User { private Long id; private String username; ... ... ...
Svetlyo Stoyanov's user avatar
1 vote
1 answer
511 views

Save a Resultset to an Array in java

I want to save the result of a whole Mysql table in an array String sDriver = "com.mysql.jdbc.Driver"; String sURL = "jdbc:mysql://www.odorxd.xyz:3306/u218933149_odor_base";...
Estenoesodor's user avatar
0 votes
1 answer
258 views

Is it good practice to declare a DB's column as an Object in a POJO class? [closed]

This is an example of my Database, Customer(idCustomer,Name,email ... ) Product(idProduct,name,price ...) Order(idOrder,idProduct,idCustomer,...) How would I declare idProduct in Order Class public ...
Zied Orabi's user avatar
0 votes
1 answer
61 views

ResultSet getDate duplicating a date and failing so on

Any idea of the reason of this behavior? From a test MySQL table with two columns Using this data (dates from 1 to 31) Retrieving the dates thru Java public static void executeQuery (Connection conn)...
Omak Al-Qantara's user avatar
2 votes
2 answers
1k views

Can't loop over ResultSet in Java [duplicate]

I have a problem. I am using the following MySQL driver in my java project: // SET THE MYSQL DRIVER Class.forName("com.mysql.cj.jdbc.Driver"); SqlConn sqlConn = new SqlConn(); In the ...
A. Vreeswijk's user avatar
0 votes
1 answer
138 views

Mysql latin characters issue in java

I have a table named 'tasks' with columns taskid, taskname and description. Description column has values with latin characters like 'ô' . SELECT cast(`taskname` as binary) FROM `tasks` TC_1 WHERE ...
Praveenkumar's user avatar
-1 votes
1 answer
223 views

Gson: class com.mysql.jdbc.JDBC4Connection declares multiple JSON fields named connectionLifecycleInterceptors

I am trying to query a database and then convert the resultset obtained into json using the google gson library.While trying todo so, i am getting the error: class com.mysql.jdbc.JDBC4Connection ...
neem88's user avatar
  • 53

15 30 50 per page
1
2 3 4 5
19