Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners 3 queries on java class
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


dffdfdfd
3 queries on java class
1 Answer(s)      a year and 7 months ago
Posted in : Java Beginners


Hey.

I need to do 3 queries on same class ( JAVA) One is to populate the combobox, the another one to populate tje jlist and the last one to use on button to open a file from database (BLOB)

Can some one help me?

thanks :)


Advertisement
View Answers

May 16, 2013 at 4:09 PM


hi friend,

You can execute multiple queries in the same Java class using execute the query in batch.

you may use the following methods addBatch(), executeBatch(), clearBatch()

For reading more how to run multiple queries in Java you may go through the following links

http://www.roseindia.net/tutorial/java/jdbc/jdbcbatch/index.html

http://www.roseindia.net/jsp/mysql-batch-multiple-insert-example.shtml

http://www.roseindia.net/tutorial/java/core/BatchInsertion.html

Thanks.



Related Tutorials/Questions & Answers:
3 queries on java class
3 queries on java class  Hey. I need to do 3 queries on same class ( JAVA) One is to populate the combobox, the another one to populate tje jlist and the last one to use on button to open a file from database (BLOB) Can some
Java Queries
Java Queries  How to use setBounds() method in Java GUI application??   The setBounds() method sets the position of swing components... javax.swing.*; import java.awt.*; import java.awt.event.*; class LoginDemo extends
Advertisements
write those 3 questions (class)
write those 3 questions (class)  1) write a function minE which takes an array of distinct integers and returns the smallest number. (If this is too... takes an array of integers and reverses it. 3) write a function isDistinct which
queries
queries  class one having the static variable and method....... we extend class one to class two ..... In clas two if we create a object for class one then we can access the static variable that present in class one
to add on to my queries - Java Beginners
to add on to my queries   Dear Experts, Sorry but I am worried that I did not explain clearly so I am adding in the error message I get from Netbean IDE when I run that queries using the last solution provided. I'm puzzled
3 Java Programs for Beginners
3 Java Programs for Beginners  Write a program that prompts the user.... Thanks for any help in advance.   import java.util.*; class... of squares: "+sum); } }   import java.util.*; class CharacterArray
Does java supports queries with references/Table alias?
Does java supports queries with references/Table alias?  Hello, I have an Oracle query:SQL> select t.TopicName, p.NumberofPolls from EMSTopic t,EMSPoll p where t.TopicID = p.TopicID and t.TopicName= 'Sybase'; which
Java Query divide frame into 3 rows and 3 columns
Java Query divide frame into 3 rows and 3 columns  how can we divide the frame into 3 rows and 3 columns
Execute SQL Queries with Java Application
Execute SQL Queries with Java Application       This is detailed java program to connect java application and execute queries like create table in mysql database, insert some
OOP with Java 3 - Java Beginners
OOP with Java 3  Write a Temperature class that has two instances... for the scale, wither C for Celsius or F for Fahrenheit. the class should have four... the following code: import java.util.*; class Temperature{ double temp; char scale
some queries pertaining to use of log4j for logging in a java application-
some queries pertaining to use of log4j for logging in a java application- ... to accomplish the requirement as per point 1? (3) If there is something that I... to use the same log file across different java classes? How do I invoke
3
java.io package  The java.io package includes a PrintStream class that has two formatting methods that we can use to replace print () and println (). Find this two methods & Describe with your own examples   
java bits 3 - Java Interview Questions
java bits 3  Given: 11. public class Test { 12. public static void.... System.out.print(?2 ?); 20. if ((b2 = true) && b1) 21. System.out.print(?3 ?); 22. } 23. } What is the result? A. 2 B. 3 C. 1 2 D. 2 3 E. 1 2 3 F. Compilation
WAP in java to print the series 1*2*3
WAP in java to print the series 1*2*3  WAP in java to print the series 123
Java Hibernate 3 Programmer
Java Hibernate 3 Programmer        Position Vacant: Java Hibernate 3 Programmer Job...; Reference ID: Java Hibernate 3 Programmer
School Timetable System in java spring mvc 3
School Timetable System in java spring mvc 3  I want to do project in timetable generation for my project. but i dont know how generate. i'm using java spring Hibernate. please some one help me. Thanks thuva
3 tier architecture in java - JSP-Servlet
3 tier architecture in java  H!, My shopping cart project is created with html, jsp, servlets and oracle using weblogic server. Html used... here that what are the 3 tiers. I tier is html ( it can also be jsp?) II tier
datatypes queries
datatypes queries  Respected sir ,what is the reason behind that java... we prefered double datatype for this?   You can use Scanner class... java.util.*; class ScannerExample { public static void main(String[] args
@Controller Annotation Example in Spring 3
can create annoted controller class in Spring 3. You can @Controller annotation in the Java class to make it controller. In this tutorial we are creating... annotation is used to mark any java class as a controller class. Note: We will used
Java class
Java class  What is the purpose of the Runtime class
Java with EJB 3
Java with EJB 3       Position Vacant: Java with EJB 3 Job Description ...://www.roseindia.net  Reference ID: Java with EJB 3
How sql Queries possible in DAO without creating Database connections - Java Beginners
How sql Queries possible in DAO without creating Database connections  In DAO we are writting sql queries , how it is possible without creating and closing database connections
java class
java class  write a java program to display a msg "window closing" when the user attempts to close the window.(a) create a window class (b) create frame within the window class (c) extends window adapter class to display the msg
java class
java class  please send me the answer of the question which i have send according of java class assoon as possible . Write a java program to display.... a. Create a window class. b. Create frame within the window class. c. Extend
JPA Native Queries, JPA Native Queries Tutorials
JPA Native Queries       In this section, you will know about the jpa native queries and how to use native query in your JPA application.  JPA Native Queries: JPA native
Hibernate named queries
Hibernate named queries  Hi, What is named queries in Hibernate? Thanks
What are criteria Queries in Hibernate?
What are criteria Queries in Hibernate?  Just explain me what is Criteria Query in Hibernate with examples? Thanks   Criteria queries are very helpful in hibernate for queries based on certain criteria. Check
Module in Flex 3
Module in Flex 3:- In the Flex 3,  Modules are dynamically loadable SWF that contains an IFlexModuleFactory class factory. They can be loaded... with the help of module class. More then one applications also used these modules
sql tips for optimizing queries
to optimize sql queries ?   Optimizing SQL Query Remove user-defined inline... actions with set-based queries Archive old data Avoid cursors   Optimizing... and the ways to replace cursors and looping actions with set-based queries Archive old
Need help with nested queries
Need help with nested queries  Hello, Table1 has "id", "votes" columns. Table2 has "id", "Name" column. I need to retrieve Name and its corresponging Votes. I tried with nested queries but its confusing. Can anyone please help
Advertisements
 

 

 

DMCA.com