JDBC ORACLE ¿¬°áÀÌ Àß ¾ÈµË´Ï´Ù. µµ¿ÍÁÖ¼¼¿ä


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :¾ÈÀç¹Î 1998³â 11¿ù 25ÀÏ 22:14:29

¹öÆ°À» ´©¸£¸é oracle¿¡ Á¢¼ÓÇÏ¿© ±×°÷ÀÇ ¹®Á¦¸¦ Àоî textâ¿¡ »Ñ·ÁÁÖ´Â Toefl À» ¸¸µé·Á±¸ ´ÙÀ½°ú °°ÀÌ
ÄÚµùÇÏ¿© test ¸¦ ÇÏ·ÁÇߴµ¥ Á¢¼ÓÀÌ Àß ¾ÈµË´Ï´Ù.


jdbc oracle7 thin driver ¸¦ Á¦ °èÁ¤¿¡ ±ò¾î³õ°í ¶Ç ¾ÖÇø´ÀÌ Àִ°÷¿¡ ¾ÐÃàÀ» Ç®¾î ³ù½À´Ï´Ù.
ÄÚµùÀÌ À߸øµÈ°ÇÁö settingÀÌ À߸øµÈ°ÇÁö ¾Æ´Ï¸é µÑ´Ù À߸øµÈ °ÇÁö Àß ¸ð¸£ °Ú½À´Ï´Ù.


µµ¿ÍÁÖ¼¼¿ä


¼Ò½º
import java.awt.*;
import java.applet.*;
import java.sql.*;


public class TOEFL extends Applet
{
Connection conn;

int next_num = 0;



public void init()
{
... .
}

void button1_MousePress(java.awt.event.MouseEvent event)
{

try{ // Á¢¼ÓºÎºÐ

DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection("jdbc:oracle:thin:¾ÆÀ̵ð/password@servername:8005:ORA7");
}catch(SQLException e) {textArea1.setText("Connect Fail");}

int num;
next_num++;
num = next_num;

try{
if (conn==null)
{
textArea1.setText("Loading JDBC driver.....");
}
Statement stmt = conn.createStatement();
ResultSet rset = stmt.executeQuery("select test from Section2 where num = " + num);


while(rset.next()){
textArea1.setText(rset.getInt(1) + rset.getString(2) + "\n");
}

} catch(Exception e){}

// to do: code goes here.
}
}



´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]