Most voted "resultset" questions
27 questions
Sort by count of
-
9
votes1
answer1020
viewsThe name of the dt_ultimo_access column was not found in this Resultset
I’m deploying a method passing an id parameter: @RequestMapping(method = RequestMethod.GET, value = "/entidadesUsuario/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public…
-
5
votes3
answers394
viewsHow to fill an Object value automatically in php?
I need a method to auto-fill my VO by receiving as parameter a mysql database result set and php’s PDO class. Example of VO class Pessoa{ public $nome; public $idade; } The idea is to incorporate…
-
5
votes2
answers305
viewsWhy is this Resultset returning null?
If I run a query in the database returns result, however, when running java code, assigning the result to a Resultset, the same appears to be empty. You can help me? PreparedStatement ps =…
-
4
votes1
answer624
views"The resultset is closed" error with Preparedstatement
I’m getting it when I’m walking through a ResultSet and get other ResultSets: public class BpaDetDao extends DaoAbstract<BpaDetBean> { public static final String // TODO Colocar campos no…
-
3
votes1
answer1362
viewsHow to convert from Timestamp to Calendar?
I need to convert a resultSet of the returning bank in Timestamp in a Calendar type variable.
-
3
votes3
answers644
viewsDiscovering the SQL of a Resultset
I have a Resultset java object that I don’t know the SQL/parameters that generated it. Would you like to know how to get the SQL used to create it? would have something like : rs.getStm.getSql ?…
-
3
votes1
answer790
viewsCheck whether the field is null in java and mysql
How do I check if a database field is filled or null? Do you have a Resultset method that does this check? In this case it is a date field. PreparedStatement ps = connection.prepareStatement("SELECT…
-
2
votes1
answer623
viewsmysqli_query() does not return false
Starting in PHP, I recently learned OO with PHP and had a little problem when converting my procedural code to OO. I have an "orgao" table (columns: id, org_name) with only 1 record. I query through…
-
2
votes0
answers65
viewsShow result in same tab (JSF)
Hello, I have the following situation: I have a button (search) that executes a search method and returns the data in the same tab already opened in a <p:dataTable. After generating a report on…
-
1
votes2
answers323
viewsHow to format resultset printing via System.out.println in Java?
Hello, I am printing on the screen the result of a SELECT that I have stored in a resultset object (sql.Resultset). But it comes out "all crooked". I tried to use the " t" between each printed…
-
1
votes0
answers39
viewsUsing two Resultset + Userlist
I’m doing two distinct database searches that will return various data that will be entered in a list. I need to create a single list with this data. And the queries must concatenate with each…
-
1
votes1
answer1014
viewsResultset first does not work
I am creating a Java application in Eclipse. I’m having trouble making the First, Previous, Next and Last buttons work. I’m stuck on the button First, because I believe the difference is just the…
-
1
votes1
answer491
viewsHow to delete 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 =…
-
1
votes1
answer512
viewsFirst() and next() methods do not work in Resultset, even when editing parameters
I need to do two iterations on the same ResultSet. For that I did the following: I set parameters in a Statement to make the cursor editable, according to my connection class constructor: public…
-
1
votes1
answer237
viewsJava: Error while recovering data from Resultset, even though query is correct
My problem is this: I am making a Java application integrated with the H2 database. I do a query via PreparedStatement and saved in a ResultSet. So far so good, no Exception is generated. In the…
-
0
votes2
answers4842
viewsBringing an Object for a Resultset
I’m having trouble bringing the data of a Java survey, I’m using Postgresql and JDBC database for persistence, public List<Tapete> listarTapetes() { PreparedStatement state = null; ResultSet…
-
0
votes1
answer739
viewsUse of Resultset, converting String to Array
I’m trying to convert some data that comes from BD to an Array, using Resultset to select BD data. In the code below it does not give any error however If I try to use a: System.out.println(x[0]);…
-
0
votes0
answers58
viewsWhy does this curl_init php result enter 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);…
-
0
votes1
answer46
viewsDatabase query, main class returns zero
I am making a query by taking only one field and one line and setting in a variable of the main class, the question is that within the Try below, the variable shows the result of the query correctly…
-
0
votes1
answer58
viewsSelect all records from a table with Groovy
I need to get all the records from a table from a script in Groovy, but with the script that I created it is taking only one record of each column and out of order too. Mine script this way: List…
-
0
votes1
answer940
viewsUse a java Resultset to print an entire table on the screen
I know that with the resultset we can do several things with a SELECT done in some table. For example: I know that we can take a table and print its contents, listing which columns we want with…
-
0
votes3
answers1061
viewsWhile Resultset.next() returning only one result
I have a problem when I put the ResultSet.next() in the while and get the information from the column of the Database returns me only one result. Table 'People': Pessoas: Idade: Marcos 22 Marcos 24…
-
0
votes1
answer72
viewsResultset object is null after Try-catch. Java
I did a query in my database and it worked, but I’m not able to use the Resultset of this query. I debugged and found that it has a correct content, but it gets null after Try catch where it is…
-
0
votes1
answer295
viewsEnum returns null from the database
Hello, I’m implementing a DAO and doing some tests, I’m having some problems in enums. When running the test class the Enum Size returns null, but in the database I have records filled correctly.…
-
-1
votes1
answer1510
views -
-1
votes1
answer556
viewsHow to save a record in Postgresql?
This error occurs when I try to save a record in the Postgresql database, I am using java mai 15, 2018 11:09:18 AM bibliotecapesca.CadastroLeitor BtnSalvarActionPerformed GRAVE: null…
-
-1
votes1
answer187
viewsResultset Return null in Java
I use the code below to check in Postgre if the table exists, running the Query in Pgadmin have as answer value null. But apparently Resultset will never return null. Is there any way to compare RS…