11 Replies - 1324 Views - Last Post: 22 April 2011 - 08:37 PM

#1 mjefry04   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

how to convert mysql to java

Posted 22 March 2011 - 10:42 AM

For example:
SET @OLD_UNIQUE_CHECK[email protected]@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @[email protected]@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @[email protected]@SQL_MODE, SQL_MODE='TRADITIONAL';

CREATE SCHEMA IF NOT EXISTS `Strategic_Staff3` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci ;
USE `Strategic_Staff3` ;

-- -----------------------------------------------------
-- Table `Strategic_Staff3`.`Recruit_Contact`
-- -----------------------------------------------------
CREATE  TABLE IF NOT EXISTS `Strategic_Staff3`.`Recruit_Contact` (
  `idRecruit` INT NOT NULL AUTO_INCREMENT ,
  `Recruit_Name` VARCHAR(45) NOT NULL ,
  `Recruit_Phone#` INT NOT NULL ,
  `Recruit_Address` VARCHAR(45) NOT NULL ,
  `Recruit_Citizenship?` VARCHAR(45) NOT NULL ,
  `Recruit_Job_Searched` VARCHAR(45) NOT NULL ,
  `Recruit_Job_Filled` VARCHAR(45) NOT NULL ,
  `Recruit_Job_Appled` VARCHAR(45) NOT NULL ,
  PRIMARY KEY (`idRecruit`) ,
  UNIQUE INDEX () )
ENGINE = InnoDB
COMMENT = 'This table explains the Recruit information';


This post has been edited by macosxnerd101: 22 March 2011 - 01:52 PM
Reason for edit:: Added code tags


Is This A Good Question/Topic? 0
  • +

Replies To: how to convert mysql to java

#2 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4618
  • View blog
  • Posts: 19,384
  • Joined: 24-September 08

Re: how to convert mysql to java

Posted 22 March 2011 - 10:59 AM

So... basically you want to make a class of contacts? Any specific way this is to be used? I would suggest maybe learning the in and outs of Java programming via tutorials, unless you're just flat out asking for code.
Was This Post Helpful? 0
  • +
  • -

#3 mjefry04   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

Re: how to convert mysql to java

Posted 22 March 2011 - 11:53 AM

yes a class of contacts. used to make a 3 tier application, from mysql to java server pages. any help will be great.
Was This Post Helpful? 0
  • +
  • -

#4 NeoTifa   User is offline

  • NeoTifa Codebreaker, the Scourge of Devtester
  • member icon





Reputation: 4618
  • View blog
  • Posts: 19,384
  • Joined: 24-September 08

Re: how to convert mysql to java

Posted 22 March 2011 - 01:17 PM

Well, I have written a few pretty decent tutorials on basic Java syntax and how to make classes. http://www.dreaminco...osmember=114461 I don't want to straight out give you code because first off, DIC doesn't like that, and second, you wont learn for yourself, that way you would know how it works and why so you can fix any errors.
Was This Post Helpful? 1
  • +
  • -

#5 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,863
  • Joined: 27-December 08

Re: how to convert mysql to java

Posted 22 March 2011 - 01:53 PM

Moved to Java.

You should also check out my tutorial on class design Moving Away From Parallel Arrays. :)
Was This Post Helpful? 1
  • +
  • -

#6 mjefry04   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

Re: how to convert mysql to java

Posted 22 March 2011 - 06:23 PM

Thanks I will look further into those tutorials. I'm here to learn. :bigsmile:
Was This Post Helpful? 0
  • +
  • -

#7 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,863
  • Joined: 27-December 08

Re: how to convert mysql to java

Posted 22 March 2011 - 06:23 PM

Glad we could help! :)
Was This Post Helpful? 1
  • +
  • -

#8 pbl   User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8381
  • View blog
  • Posts: 31,956
  • Joined: 06-March 08

Re: how to convert mysql to java

Posted 22 March 2011 - 06:29 PM

There are a lot of JDBC tutorial

Basically you will have to store your SQL statement in a String variable

Make a Connection object by connecting to the database

Execute the SQL statement with the Connection object
Was This Post Helpful? 2
  • +
  • -

#9 mjefry04   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

Re: how to convert mysql to java

Posted 25 March 2011 - 05:51 AM

How to improve this jsp file to query mysql data and deploy to tomcat? It still gray to me.
I have more if needed.
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!-- <import="java.sql.*;"%>    -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Staffing 3</title>
</head>

<body>
<h1> Staffing 3 </h1>

<table cellspacing="8" cellpadding="5" border="2>"
<h1> Recruit Contact </h1>

<form>
First name: <input type="text" name="firstname" />
Last name: <input type="text" name="lastname" />
Phone#: <input type="text" name="phone#" /><br />
Address: <input type="text" name="address" />
U.S. Citizen?: <input type="text" name="citizen" /><br />
How many Job Searches?: <input type="text" name="jobsearches" />
Is the Job Filled?: <input type="text" name="jobfilled" />
Which Job Applied?: <input type="text" name="jobapplied" />
</form>


This post has been edited by macosxnerd101: 25 March 2011 - 05:55 AM
Reason for edit:: Please use code tags

Was This Post Helpful? 0
  • +
  • -

#10 macosxnerd101   User is online

  • Games, Graphs, and Auctions
  • member icon




Reputation: 12680
  • View blog
  • Posts: 45,863
  • Joined: 27-December 08

Re: how to convert mysql to java

Posted 25 March 2011 - 05:55 AM

Since this is JSP, I'll move it to Java EE. :)

I'm not familiar with JSP, but you may find this tutorial helpful.
Was This Post Helpful? 0
  • +
  • -

#11 sas1ni69   User is offline

  • D.I.C Regular
  • member icon

Reputation: 86
  • View blog
  • Posts: 431
  • Joined: 04-December 08

Re: how to convert mysql to java

Posted 18 April 2011 - 05:34 PM

If you're using JSP you might want to look into EJB or even a framework like Hibernate.
Was This Post Helpful? 0
  • +
  • -

#12 mjefry04   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 27-September 10

Re: how to convert mysql to java

Posted 22 April 2011 - 08:37 PM

I need to user interface this jsp file to have left column, right column, etc like a webpage view. Also it must be able to pull from the myql file. A MVC pattern.
I have more code if needed.

homepage.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="/header.jsp" %>
<%@include file="/left_column.jsp" %>
<%@include file="header.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Staffing 3</title>
</head>
<body>
<td width="404" valign="top">
<h1>Hello Staffing 3 Recruiters</h1>
<td>
</body>

<%@include file="/right_column.jsp" %>
<%@include file="/footer.jsp" %>

</html>
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1