Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML
 
 
Hot Web Programming Job

 

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Java Tutorials

Core Java
JSP
Servlet
JDBC
Hibernate
Struts 1
Struts 2
JSF
Spring
J2EE
J2ME
Web Services
Ajax
Dojo
MySQL
Latest Comments
Null pointer excep
swap program faile
hi.........
very good
navigaton mobile
  All Comments...
 

 

 
Struts Tutorials
*Stuts TOC
*Apache Struts Introduction
* Struts Controller
* Struts Action Class
* Struts ActionFrom Class
* Using Struts HTML Tags
*Struts Validator Framework    
*Client Side Address Validation    
*Struts Tiles
*tiles-defs.xml
*Struts DynaActionForm
*Struts File Upload
*Struts DataSource
*AGGREGATING ACTIONS
*Internationalization
Struts Resources
*Struts Books
*Struts Articles
*Struts Frameworks
*Struts IDE
*Struts Alternative
*Struts Links
*Struts Presentations
*Struts Projects
*Struts Software
*Struts Reference
*Struts Resources
*Other Struts Tutorial
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Jdbc Jdbc Mysql CreateTable

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

8 comments so far (post your own) View All Comments Latest 10 Comments:

providing good help to developers keep it up....!

Posted by shailesh on Friday, 01.30.09 @ 05:59am | #84322

please give solution for that

Posted by syeddiwan on Tuesday, 03.18.08 @ 16:07pm | #53175

now i've found a good tutorial on jdbc.
definitly this type of tutorial is going to be
master in java step by step.

Posted by pankaj on Saturday, 02.2.08 @ 07:25am | #46935

you lessons is very great thanks

Posted by mustafa on Tuesday, 11.13.07 @ 09:00am | #37167

Respected!
Would u like to tell me how i can create the table in MS Access, where i have to make changing in the previous example of cretating a table in mysql
regards

Posted by m masoom on Sunday, 09.23.07 @ 01:14am | #28883

<html>
<head>
<%@ page
import = "java.io.*"
import = "java.lang.*"
import = "java.sql.*"
%>
<title>
JSP Example 2
</title>
</head>
<body>
<h1>JSP Example 3</h1>
<%
String place;
Connection dbconn;
ResultSet results;
PreparedStatement sql;
try
{
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
try
{
int latitude,longitude,easting,northing;
boolean doneheading = false;


out.println("Suyog before connection");

dbconn = DriverManager.getConnection("jdbc:mysql::/localhost:8080/LA/employee","","");
out.println("Suyog database");
// place = request.getParameter("place");
sql = dbconn.prepareStatement("SELECT * FROM employee");
results = sql.executeQuery();
while(results.next())
{
if(! doneheading)
{
out.println("<table border=2>");
doneheading = true;
}
latitude = results.getInt("latitude");
longitude = results.getInt("longitude");
easting = results.getInt("easting");
northing = results.getInt("northing");
out.println("<tr><td>" + latitude);
out.println("<td>" + longitude);
out.println("<td>" + easting);
out.println("<td>" + northing);
}
if(doneheading)
{
out.println("</table>");
}
else
{
out.println("No matches for ");
}
}
catch (SQLException s)
{
out.println("SQL Error<br>");
}
}
catch (ClassNotFoundException err)
{
out.println("Class loading error");
}
%>
</body>
</html>

Posted by suyoh on Saturday, 09.15.07 @ 12:06pm | #27017

how can using statement and create statement


public static void main(String args[]) {
System.out.println("Table Creation Example!");
Connection con = null;
String url = "jdbc:mysql://localhost:3306/";
String dbName = "rameshdb";
String driverName = "com.mysql.jdbc.Driver";
String userName = "root";
String password = "root";
try{
Class.forName(driverName).newInstance();
con = DriverManager.getConnection(url+dbName, userName, password);
try{
Statement st = con.createStatement();
String table = "CREATE TABLE Employee11(Emp_code integer, Emp_name varchar(10))";
st.executeUpdate(table);
System.out.println("Table creation process successfully!");
} catch(SQLException s){
System.out.println("Table all ready exists!");
}
con.close();
} catch (Exception e){
e.printStackTrace();
}

Posted by ramesh on Friday, 07.27.07 @ 16:31pm | #22055

This is the best tutorial i have come through.

Posted by Thatayaone on Sunday, 03.4.07 @ 19:33pm | #10639

Leave your comment:

Name:

Email:

URL:

Title:

Comments:


Enter Code:

Audio Version
Reload Image
 

Note: Emails will not be visible or used in any way, and are not required. Please keep comments relevant. Any content deemed inappropriate or offensive may be edited and/or deleted.

No HTML code is allowed. Line breaks will be converted automatically. URLs will be auto-linked. Please use BBCode to format your text.

Back to Tutorial

 

  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name
Search Tutorials

 

 
 
Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL
 

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2007. All rights reserved.