Questions tagged as 'resultset'

0
answers

Using two ResultSet + UserList

I'm doing two distinct searches on the database that will return various data that will be inserted into a list. I need to create a single list with this data. And the searches should concatenate with each other. The first position in the...
asked by 27.11.2015 / 13:11
2
answers

While ResultSet.next () returning only one result

I have a problem, when I put the ResultSet.next() in while and I get the information in the Database column it returns only one result. People table: Pessoas: Idade: Marcos 22 Marcos 24 Marcos 25 Robe...
asked by 20.07.2018 / 21:12
1
answer

Use a ResultSet in java to print a whole table on the screen

I know that with resultSet we can do several things with a SELECT done in some table. For example: I know we can get a table and print its contents, listing which columns we want with methods like: getString and getInt. Conection con = ..........
asked by 30.01.2018 / 00:22
2
answers

Bringing an Object to a ResultSet

I'm having trouble getting data from a Java search, I'm using PostgreSQL and JDBC database for persistence, public List<Tapete> listarTapetes() { PreparedStatement state = null; ResultSet rs = null; try{ String sql =...
asked by 05.11.2014 / 23:52
1
answer

How to suppress the return of curl_init php?

This same function I put in another question for another reason, in this question I want to delete the text that $ result returns: ... $fields = http_build_query($data); $post = curl_init(); $url = $url . '?' . $fields; curl_setopt($post,...
asked by 25.05.2018 / 01:15
1
answer

Enum returns null of the bank

Hello, I'm implementing a DAO and doing some testing, I'm having some problems with enums. When running the test class the enum Size returns null, but in the database I have filled records correctly. Test class: package br.com.caelum.jd...
asked by 26.02.2018 / 15:58
0
answers

Why is this curl_init php result false?

I have the following script: ... $fields = http_build_query($data); $post = curl_init(); $url = $url . '?' . $fields; curl_setopt($post, CURLOPT_URL, $url); curl_setopt($post, CURLOPT_POST, 1); curl_setopt($post, CURLOPT_POSTFIELDS, $fiel...
asked by 24.05.2018 / 22:20
1
answer

mysqli_query () does not return false

Starting in PHP, I recently learned OO with PHP and had a problem converting my procedural code to OO. I have an "organ" table (columns: id, name_orgao) with only 1 record. I query through a DAO (I loved this): class OrgaoDao{ private $conexao...
asked by 25.09.2016 / 21:53
1
answer

Bank query, main class returns zero

I am doing a query taking only one field and one row and settling on a main class variable, the question is that within the try below, the variable shows the result of the query correctly String sql1 = "select ca_id from cadastro where ca_no...
asked by 29.09.2016 / 23:17
1
answer

Using ResultSet, converting String to Array

I'm trying to convert some data that comes from DB into an Array, using ResultSet to select DB data. In the code below it does not give any error though. If I try to use one:    System.out.println (x [0]); It does not show the first data,...
asked by 23.04.2015 / 21:51