Questions tagged [apache-commons-dbutils]

Apache Commons Dbutils is a toolkit that simplifies the usage of the Java Database Connectivity (JDBC) API.

Apache Commons DbUtils is a component of the Apache Commons project. Apache Commons DbUtils is library that simplifies JDBC programming and is open source software distributed under the Apache License, Version 2.0.

86 questions
0
votes
1 answer

Java Generics + Class name in String format

Below is running fine: ResultSetHandler> h = new BeanListHandler(MyClass.class); Issue is that MyClass is hard-coded. Above line is at centralized location and hence hard-coding is bad. I have fully qualified class name of…
Nikhil Joshi
  • 817
  • 2
  • 12
  • 34
0
votes
1 answer

DBUtils cannot convert string to date

I am using apache dbutils. I have an object with a java.util.Date attribute in it. When I execute the following code, it fails for the sql select name, startDate from myTable try { QueryRunner run ; run = new QueryRunner(); …
user3586195
  • 498
  • 4
  • 15
0
votes
2 answers

More than one jTable with the same ResultSet in Java

Can you populate more than one jTable with the same resultSet? public void tableDisplay() { String tableQuery = "SELECT foodQuantity,foodName FROM food ORDER BY RAND() LIMIT 3"; ResultSet rs; PreparedStatement statement; try { …
0
votes
1 answer

How to delete an object in Jtable

I use Dbutils to call elements in one table of database private void showEvent(){ try { String query="SELECT EventID, MemberID,Description, Date, Time, Venue, EventTypes FROM formal UNION SELECT EventID, …
0
votes
1 answer

java commons dbutils: multi-part identifier could not be bound

I'm executing this query: SELECT psq_id, question_text FROM presales_question WHERE psq_id IN(SELECT zz.psq_id FROM productservice_psq as zz WHERE zz.ps_id = 1) When I execute it directly in SQL Server Management Studio, it works. When I…
bradvido
  • 2,743
  • 7
  • 32
  • 49
0
votes
1 answer

How to populate jTable using MS ACCESS on a button event?

Here is my Code: Its not displaying any data on Jtable please help me guys: Connection con=null; ResultSet rs=null; PreparedStatement ps=null; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection…
0
votes
1 answer

how can I use persistence.xml to configurate apache-common-dbutils?

JPA is pretty good for immutable tables but I can't handle dynamic table. Then I decide to use JPA for handle al the unalterable tables (the core of the application) and dbutils from apache to handle all my the dynamic tables Both kind of tables are…
Troncador
  • 3,356
  • 3
  • 23
  • 40
0
votes
1 answer

Connection Pooling using Apache common DBCP And DBUtils and concurrency

I'm investigating concurrency when doing multiple queries in different threads. I am using Apache DBCP and DBUtils not because I want to complicate my life but because they should guarantee that the queries are handled correctly and so the…
0
votes
1 answer

Calling a stored procedure using apache DBUtils

I cannot find how we can use DBUtils to invoke callable statements Can we some how specify which all fields are inputs and which all re outputs ?
Shamis Shukoor
  • 2,515
  • 5
  • 29
  • 33
-1
votes
1 answer

Can DBUtils overcome SQLServer: "The statement must be executed before any results can be obtained."

I am trying to insert data into a SqlServer table that has a generated key. I don't care about the new keys created, but the error I get back seems to suggest I must: java.sql.SQLException: The statement must be executed before any results can be…
markthegrea
  • 3,731
  • 7
  • 55
  • 78
-3
votes
1 answer

How to convert an ArrayList to Object[][] in Java?

What is the easiest way to convert a Java ArrayList to Object[][]? For example: List myList = new ArrayList(); myList.add(myObj1); myList.add(myObj2); Object[][] objArray = myList.... How do I convert? The reason I'm trying to…
Fade
  • 13
  • 1
  • 3
1 2 3 4 5
6