<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://valley.egloos.com/rss/style/style.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>이글루스 'preparedstatement' 태그 최근글</title>
		<link>http://valley.egloos.com/tag/preparedstatement</link>
		<description>preparedstatement</description>
		<language>ko</language>
		<pubDate>Wed, 04 Apr 2012 17:20:26 +0900</pubDate>
		<generator>Egloos</generator>
		<item>
	<title><![CDATA[prepareStatement와 Statement 비교]]></title>
	<link>http://xxwony.egloos.com/25901</link>
	<guid>http://xxwony.egloos.com/25901</guid>
	<description>
	<![CDATA[ 
============================================================================================================ Statement는 &amp;lt;String sql = &quot;insert into t01_bbs(bbsno,title,cont,rgstnm) values(3,2,42,44)&quot; 이런식으로 값을 정해주기떄무에 불변에 수가 아니라면 다음에 바꾸어 줄때도 이런식의 쿼리를 작성해야 한다. ============================================================================================================   //1. Statement객체 stmt 생성    	]]>
	</description>
	<pubDate>Wed, 04 Apr 2012 17:20:26 +0900</pubDate>
	<dc:creator><![CDATA[spWony]]></dc:creator>
</item>
<item>
	<title><![CDATA[PreparedStatement를 사용한 쿼리 실행]]></title>
	<link>http://xxwony.egloos.com/24847</link>
	<guid>http://xxwony.egloos.com/24847</guid>
	<description>
	<![CDATA[ 
public void doService(HttpServletRequest req, HttpServletResponse res)throws ServletException, IOException, SQLException {   int result = 0;   Connection conn = null;   PreparedStatement psmt = null;      try{         Class.forName(&quot;oracle.jdbc.driver.OracleDriver&quot;);   }catch(ClassNotFoundException cnf){          System.out.println(&quot;DB접속 드라이버가없습니다. : &quot;+cnf);      }   // 2.DB연결 - Connection   try{ 	]]>
	</description>
	<pubDate>Tue, 03 Apr 2012 10:29:32 +0900</pubDate>
	<dc:creator><![CDATA[spWony]]></dc:creator>
</item>
<item>
	<title><![CDATA[OracleConnectionPool 을 이용하여 Select 만들어보기]]></title>
	<link>http://guitarhyo.egloos.com/565936</link>
	<guid>http://guitarhyo.egloos.com/565936</guid>
	<description>
	<![CDATA[ 
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import java.sql.Statement;import java.util.Properties;  import oracle.jdbc.driver.OracleDriver;    // 전에 select한 부분과 비교하여 생각해보자 무엇이 달라졌는지public class SelectJDBC {  	public static void main(String[] args)throws Exception {	//DB에 로그인하기 위한 접속정보 선언//		String	]]>
	</description>
	<pubDate>Mon, 02 Apr 2012 16:44:47 +0900</pubDate>
	<dc:creator><![CDATA[햄볶은느낌]]></dc:creator>
</item>
<item>
	<title><![CDATA[JDBC 를 이용하여 Delete 하기]]></title>
	<link>http://guitarhyo.egloos.com/565924</link>
	<guid>http://guitarhyo.egloos.com/565924</guid>
	<description>
	<![CDATA[ 
import java.sql.*;  //args 를 이용하여 id 값에대한 row 지우기public class  DeleteJDBC{    ///Field    ///Constructor    ///Method    ///Main method    	public static void main(String[] args) throws Exception{				String url = &quot;jdbc:oracle:thin:@127.0.0.1:1521:xe&quot;;		String driver = &quot;oracle.jdbc.driver.OracleDriver&quot;;  		Class.forName (driver);		Connection con = DriverManager.getConnection(url,&quot;scott&quot;,&quot;tiger&quot;);			]]>
	</description>
	<pubDate>Mon, 02 Apr 2012 16:32:18 +0900</pubDate>
	<dc:creator><![CDATA[햄볶은느낌]]></dc:creator>
</item>
<item>
	<title><![CDATA[JDBC 로 insert 하기]]></title>
	<link>http://guitarhyo.egloos.com/565918</link>
	<guid>http://guitarhyo.egloos.com/565918</guid>
	<description>
	<![CDATA[ 
import java.sql.*;  // args 인자값을 받아 insert 하기// PreparedStatement  를 이용하여 만들기public class  InsertJDBC{    ///Field    ///Constructor    ///Method    ///Main method    	public static void main(String[] args) throws Exception{		if(args.length != 3){			System.out.println(&quot;no 값 id 값 pwd 값 입력해야해&quot;);			System.exit(1);		}				int no = Integer.parseInt(args[0]);		String id = args[1];		String pwd = args[2];		]]>
	</description>
	<pubDate>Mon, 02 Apr 2012 16:28:05 +0900</pubDate>
	<dc:creator><![CDATA[햄볶은느낌]]></dc:creator>
</item>
<item>
	<title><![CDATA[[iBatis / myBatis] $, # 의 차이점]]></title>
	<link>http://marobiana.egloos.com/1089757</link>
	<guid>http://marobiana.egloos.com/1089757</guid>
	<description>
	<![CDATA[ 
iBatis가 업데이트 되면서 myBatis로 바뀌었는데 문법이 바뀌었다. iBatis의 dynamic 태그도 if로 바뀌고 등등 마니 바꼈는데, 일단 제목에 쓴걸 설명하기 위해 기본 select 문법만 쓴다.      iBatis :  &amp;lt;select id=&quot;getAll&quot; parameterClass=&quot;java.util.HashMap&quot; resultClass=&quot;java.util.HashMap&quot;&amp;gt;	SELECT * FROM USER	WHERE 	col = #value#&amp;lt;/select&amp;gt;    myBatis :  &amp;lt;select id=&quot;getAll&quot; parameterType=&quot;hashmap&quot; resultType=&quot;hashmap&quot;&amp;gt;	SELECT * FROM USER	WHERE 	col = 	]]>
	</description>
	<pubDate>Wed, 18 Jan 2012 18:09:15 +0900</pubDate>
	<dc:creator><![CDATA[그림그리는 프로그래머 신매력]]></dc:creator>
</item>
<item>
	<title><![CDATA[JSP DB연결 및 쿼리]]></title>
	<link>http://tiger5net.egloos.com/5570765</link>
	<guid>http://tiger5net.egloos.com/5570765</guid>
	<description>
	<![CDATA[ 
오랜만에 JSP를 만질 일이 있어서 다시 한번 정리해둔다.  &amp;lt;%@ page language=&quot;java&quot;      contentType=&quot;text/html;charset=euc-kr&quot;      import=&quot;java.util.*,java.io.*,java.sql.*&quot; %&amp;gt;  &amp;lt;%     // 드라이버를 위해 웹서버 lib에 sqljdbc4.jar 저장 필요      String strDriver = &quot;com.microsoft.sqlserver.jdbc.SQLServerDriver&quot;;     String strDBConn = &quot;jdbc:sqlserver://IP ADDRESS:1433;DatabaseName=DBNAME&quot;;     String strUserID = &quot;USERID&quot;;     St	]]>
	</description>
	<pubDate>Thu, 10 Nov 2011 17:23:06 +0900</pubDate>
	<dc:creator><![CDATA[어린왕자와 여우]]></dc:creator>
</item>
<item>
	<title><![CDATA[addBatch()와 executeBatch() 의 사용]]></title>
	<link>http://pdw213.egloos.com/3481113</link>
	<guid>http://pdw213.egloos.com/3481113</guid>
	<description>
	<![CDATA[ 
1. Statement  객체  Statment stmt = con.getStatement(); stmt.addBatch(sql statment); stmt.addBatch(sql statment); stmt.addBatch(sql statment); stmt.addBatch(sql statment); .. int[] insCounts = stmt.executeBatch();   2. PrearedStatement  객체  preparedStatement pstmt  = con.prepareStatement(&quot;DELETE FROM member_t WHERE no = ?&quot;); for (int i = 0; i &amp;lt; 10; i++){     pstmt.setInt(1, n);     pstmt.addBatch	]]>
	</description>
	<pubDate>Fri, 11 Dec 2009 16:45:30 +0900</pubDate>
	<dc:creator><![CDATA[자바란 무엇인가?]]></dc:creator>
</item>
<item>
	<title><![CDATA[서블렛 + JDBC 연동시 코딩 고려사항 -제1탄-]]></title>
	<link>http://byulbada.egloos.com/2380018</link>
	<guid>http://byulbada.egloos.com/2380018</guid>
	<description>
	<![CDATA[ 
저자명만 빼먹지 않으면 복사도 허용한다고 하셔서 그대로 긁어왔습니다. 최초작성일자: 2000/09/05 16:19:47  최근 수정일 : 2001.01.27 최근 수정일 : 2001.03.12(nested sql query issue) 최근 수정일 : 2001.03.13(transaction) 최근 수정일 : 2001.03.20(instance variables in JSP) 최근 수정일 : 2001.04.03(문맥수정) 최근 수정일 : 2002.02.06(&quot;close 할 땐 제대로...&quot; 추가사항첨가) 최근 수정일 : 2002.02.25(&quot;transaction관련 추가&quot;) 최근 수정일 : 2002.06.11(PreparedStatement에 의한 ResultSet close 이슈) 최근 수정일 : 2002	]]>
	</description>
	<pubDate>Wed, 24 Jun 2009 18:12:29 +0900</pubDate>
	<dc:creator><![CDATA[별소리의 엄마쟤흙먹어]]></dc:creator>
</item>
<item>
	<title><![CDATA[[ Java ][ 에러 ] ORA-00911: 문자가 부적합합니다]]></title>
	<link>http://byulbada.egloos.com/2283984</link>
	<guid>http://byulbada.egloos.com/2283984</guid>
	<description>
	<![CDATA[ 
이건 자바 에러라기보다는 오라클 에러라고 해야 될 것 같기도 하지만...     strSqlQuery.append(&quot;select * from tableName where colName=?;&quot;);    preparedStatement_ = connection.prepareStatement(strSqlQuery.toString());    preparedStatement_.setString(1, &quot;문자열&quot;);   요렇게 실행시켰더니 [ ORA-00911: 문자가 부적합합니다 ]라는 에러가 뜬다. 문제는 의외로 단순한 거였는데,   쿼리문을 직접 DB에서 쓸 때와 달리 PreparedStatement에서는 쿼리문이라고 끝에 세미콜론(;)을 붙여줄 필요가 없었다...    strSqlQuery.append(&quot;sel	]]>
	</description>
	<pubDate>Thu, 26 Feb 2009 20:44:19 +0900</pubDate>
	<dc:creator><![CDATA[별소리의 엄마쟤흙먹어]]></dc:creator>
</item>
<item>
	<title><![CDATA[[JDBC 쿼리 로깅] PreparedStatement를 사용하여 JCBC 코드에 로깅 추가하기]]></title>
	<link>http://bumjin.egloos.com/3557321</link>
	<guid>http://bumjin.egloos.com/3557321</guid>
	<description>
	<![CDATA[ 
JDBC 쿼리 로깅을 쉽게PreparedStatement를 사용하여 JCBC 코드에 로깅 추가하기          	]]>
	</description>
	<pubDate>Tue, 01 Jan 2008 14:42:30 +0900</pubDate>
	<dc:creator><![CDATA[지니랜드]]></dc:creator>
</item>
<item>
	<title><![CDATA[JDBC Connection에서의 PreparedStatement의 사용]]></title>
	<link>http://schoolor.egloos.com/1672696</link>
	<guid>http://schoolor.egloos.com/1672696</guid>
	<description>
	<![CDATA[ 
Java 입문공부중에 느껴지는 의문과 그에 대한 해결(?)  JDBC에서 사용하는 PreparedStatement와 CallableStatement는 Query를 최적화하여 사용한다고 되어있다.  예제코드에서는 ... PreparedStatement pstmt = conn.prepareStatement(&quot;...?... &quot;); pstmt.set...(..., ...); pstmt.execute...(); ...  이런식으로 되어있었다.   여기서 들었던 의문은, Connection instance에서 prepareStatement(&quot;...&quot;);를 실행한 후 return된 PreparedStatement instance를 어떻게든 Application에서 저장해서 다시 사용해야하지 않을까 하는 것이었다.    	]]>
	</description>
	<pubDate>Thu, 23 Mar 2006 14:55:27 +0900</pubDate>
	<dc:creator><![CDATA[Knock'n on Heaven's door]]></dc:creator>
</item>
	</channel>
</rss>

