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



Home Answers Viewqa Java-Beginners Thanks for fast reply
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ragini Shukla
Thanks for fast reply
1 Answer(s)      6 years and 4 months ago
Posted in : Java Beginners



Advertisement
View Answers

July 1, 2008 at 7:54 PM


oh well... do not get confused with all that! these are very simple and easy to learn, so just follow the link given below

http://www.roseindia.net/jdbc/jdbc-steps.shtml

and this is the database connectivity code..

Connection con = null;
String url = "jdbc:mysql://localhost:3306/";;
String db = "jdbc";
String driver = "com.mysql.jdbc.Driver";
String user = "root";
String pass = "root";
try{
Class.forName(driver);
con = DriverManager.getConnection(url+db, user, pass);
Statement st = con.createStatement();
ResultSet res = st.executeQuery("SELECT * FROM employee");
while (res.next()) {
String employeeName = res.getString("employee_name");
System.out.println(employeeName );
}

}
catch (Exception e){
System.err.println("Could not load JDBC driver");
System.out.println("Exception: " + e);
e.printStackTrace();
}

Just read the tutorial completely, and u'll able to do it.

Good luck!!!!!!!!


Related Tutorials/Questions & Answers:
Thanks for fast reply - Java Beginners
Thanks for fast reply  Thanks for response I am already use html for data grid but i m noot understood how to connect to the data base, and how to fetch data from table in the data grid I am using mysql database package
fast Reply - Java Beginners
fast Reply  Hi Friend I want to passing value one page to another page without using session varible....please help me write the code and send me   Hi friend, For solving the problem visit to : http
Advertisements
goto statement problem. reply fast.
goto statement problem. reply fast.  I have done some operation, and want to repeat same operation again at users choice. but its not working properly. I am using goto statement. void main() { float rs, p; char z
please reply fast if anyone knows that how to install mysql on windows using msi package
please reply fast if anyone knows that how to install mysql on windows using msi package  please reply fast if anyone knows that how to install mysql on windows using msi package   Hello Friend, visit here Thanks
Thanks
Thanks  This is my code.Also I need code for adding the information on the grid and the details must be inserted in the database. Thanks in advance
Thanks - Java Beginners
Thanks  Hi, Thanks for reply I m solve this problem   Hi ragini, Thanks for visiting roseindia.net site
reply to the mail
reply to the mail  Hi! which jar file needed to be added? Thanks   Question not clear
fast view web--yes - Struts
fast view web--yes  How to enable the fast web view--yes on pdf file  Hi Friend, Please clarify your problem. Thanks
Reply - JSP-Servlet
... Thanks for your fast reply.. Thanks/Regards, R.Ragavendran..  ... it? thanks and regards prashu
Thanks - Java Beginners
Thanks  Hi Rajnikant, Thanks for reply..... I am... is the advantage of interface and what is the use of interface... Thanks... and analyze you got good scenario about Interface Thanks Rajanikant   Hi
reply must
reply must  is it critical to do a software job based on games(java) i know core java & advanced java basics only please give me answer
thanks - JSP-Servlet
thanks   thanks sir i am getting an output...Once again thanks for help
thanks - JSP-Servlet
thanks  thanks sir its working
fast food restaurant
fast food restaurant  I need to design a Java application to manage a drive-thru restaurant. There are two drive-thru windows to serve customers and a kitchen to prepare the ordered food. Use an random number generator
Thanks to Amardeep - Java Beginners
Thanks to Amardeep  i don't know how to thank you Amar! i real thank for what you did' i mean what you did is really my pressure, thanks.... thanks Amardeep. 2hafeni
Thanks to Amardeep - Java Beginners
Thanks to Amardeep  i don't know how to thank you Amar! i real thank for what you did' i mean what you did is really my pressure, thanks.... thanks Amardeep. 2hafeni
Thanks - Java Beginners
Thanks  Hi, Yur msg box coding is good Thanks  Hi Thanks & Regards
Thanks - Java Beginners
Thanks  Hi, thanks This is good ok this is write code but i... either same page or other page. once again thanks    hai... the problem... state it correctly.... thanks and regards prashu
thanks - Development process
thanks  thanks for sending code for connecting jsp with mysql. I have completed j2se(servlet,jsp and struts). I didn't get job then i have learnt.... please help me. thanks in advance
Thanks - Java Beginners
Thanks  Thanks Deepak Thankyou so much this is good web application but i m clicking insert button then addform.jsp page is not open plz suggest me   hai friend I think u gave the url is not currect. Check
Thanks - Java Beginners
Thanks  Hi, Thanks ur sending url is correct..And fullfill requirement.. I want this.. I have two master table and form vendor... and send me... Thanks once again...for sending scjp link
Thanks - Java Beginners
Thanks  Hi, Thanks ur sending url is correct..And fullfill... and send me... Thanks once again...for sending scjp link  Hi friend... to visit : http://www.roseindia.net/ Thanks
Reply Me - Java Beginners
=13c222b87273340cf002bfba4ab9d045. please reply me fast its urgent...Reply Me  Hi All, I want to using query string in my page please write the query string in java script and send me and I have a some link
Reply - Struts
Reply   Thanks For Nice responce Technologies::--JSP please write the code and send me....when click "add new button" then get the null value...? thanks
Reply - Struts
/pages/HelloWorld.jsp Thanks vinod
Reply me - Java Beginners
Reply me  Hi,   Hi Ragini please specify main problem. where are problem in your code. Thanks
Plz chk it and reply again - Java Beginners
Plz chk it and reply again  Hi Deepak, Thanks for fast reply,your application is good,u write this code for user click the view database... fast reply.  Hi Ragini, Please specify your requirements
Reply Me - Struts
Reply Me  Hi Friends, Please write the code using form element...because i got error in textbox null value  Hi Soniya Would you... to provide a better solution for you.. Thanks
Reply me - Java Beginners
Reply me  If u r not understood my just posted question plz let me know  Hi Ragini, Please specify your requirements in detail... explain about grid. Thanks Amardeep
Hi and Thanks for ur response - Hibernate
Hi and Thanks for ur response  Hi, thanks for ur immediate response.Could anyone know abt the elements generated by generic DAO classes and pls let me know what is persistenceInstance with one good example. pls explain me
Advertisements
 

 

 

DMCA.com