JDBCÅú´¦Àí (java ¶ÔÊý¾Ý¿âµÄ»Ø¹ö£©
1ÏÈ¿´Ò»Ï³ÌÐò£º
package com.redking.jdbc.demo;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
public class JDBCDemo07 {
public static final String DBDRIVER = "sun.jdbc.odbc.JdbcOdbcDriver" ;
public static final String DBURL = "jdbc:odbc:testDB" ;
public static void main(String[] args) {
Connection conn = null ;
Statement pstmt = null ;
try {
// ÏòJAVAÈÝÆ÷ÖмÓÔØÇý¶¯
Class.forName(DBDRIVER) ;
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
try {
conn = DriverManager.getConnection(DBURL) ;
} catch (SQLException e) {
e.p
Ïà¹ØÎĵµ£º
¡¡¡¡(1) ÀàÃûÊ××ÖĸӦ¸Ã´óд¡£×ֶΡ¢·½·¨ÒÔ¼°¶ÔÏó(¾ä±ú)µÄÊ××ÖĸӦСд¡£¶ÔÓÚËùÓбêʶ·û£¬ÆäÖаüº¬µÄËùÓе¥´Ê¶¼Ó¦½ô¿¿ÔÚÒ»Æ𣬶øÇÒ´óдÖм䵥´ÊµÄÊ××Öĸ¡£ÀýÈ磺
¡¡¡¡ThisIsAClassName
¡¡¡¡thisIsMethodOrFieldName
¡¡¡¡ÈôÔÚ¶¨ÒåÖгöÏÖÁ˳£Êý³õʼ»¯×Ö·û£¬Ôò´óдstatic final»ù±¾ÀàÐͱêʶ·ûÖеÄËùÓÐ×Öĸ¡£ÕâÑù±ã¿É±êÖ¾³öË ......
ѧϰJava´ó¸ÅÒ»¸öÔÂÁË£¬ÓÉÓÚÒÔÇ°ÓÐc/c++»ù´¡£¬ËùÒÔÔÚJ2SE²¿·ÖµÄѧϰÊDZȽϿìµÄ£¬½ñÌìÔÚÂÛ̳¿´µ½Ò»¸öÍøÓѵÄÇóÖúÌû£¬Òª½«Ó²ÅÌÉÏÁ½¸öÎļþºÏ²¢ÎªÒ»¸ö²¢É¾³ýÔÎļþ£¬ÓÚÊDZãдÁ˲âÊÔ³ÌÐò¡£ºóÀ´ÔÚɾ³ýÎļþʱ£¬ÓÉÓÚûÓаѶµ½ÎļþÉϵÄÊä³öÁ÷¹Ø±Õ£¬µ¼ÖÂÔõôҲÎÞ·¨É¾³ý¡£¶øÇÒÒ»Ö±²é²»³öÔÒò£¬ºóÀ´ÒÔΪÊÇdelete·½·¨Ö»ÄÜɾ³ý¿ÕÎļþ£¬Ò»g ......
×¼±¸¹¤×÷
Ê×ÏÈ£¬²Ù×÷ϵͳÖа²×°ºÃSQL Server 2000/2005£¬Èç¹ûϵͳÖж¼×°ÓÐ2000ºÍ2005°æ£¬¼ÇµÃÍ£ÓÃÒ»¸ö£¬Ö»¿ªÒ»¸öÐÐÁË¡£
È»ºó£¬µ½Î¢ÈíÍøÕ¾ÏÂÔØMicrosoft SQL Server 2005 JDBC Driver 1.1
£¬Ò²¿ÉÒÔʹÓÃÕâ¸öµØÖ·Ö±½ÓÏÂÔØ
¡£
½âѹsqljdbc_1.1.1501.101_chs.exe£¬°Ñsqljdbc_1.1¸´ÖƵ½%ProgramFiles%£¨Èç¹ûϵͳÔÚCÅÌÔòΪC:\ ......
1. Java ÃüÃûÔ¼¶¨
¡¡¡¡³ýÁËÒÔϼ¸¸öÌØÀýÖ®Í⣬ÃüÃûʱӦʼÖÕ²ÉÓÃÍêÕûµÄÓ¢ÎÄÃèÊö·û¡£´ËÍ⣬һ°ãÓ¦²ÉÓÃСд×Öĸ£¬µ«ÀàÃû¡¢½Ó¿ÚÃûÒÔ¼°Èκηdzõʼµ¥´ÊµÄµÚÒ»¸ö×ÖĸҪ´óд¡£
1.1 Ò»°ã¸ÅÄî
¡¡¡¡* ¾¡Á¿Ê¹ÓÃÍêÕûµÄÓ¢ÎÄÃèÊö·û
¡¡¡¡* ²ÉÓÃÊÊÓÃÓÚÏà¹ØÁìÓòµÄÊõÓï
¡¡¡¡* ²ÉÓôóСд»ìºÏʹÃû×ֿɶÁ
¡¡¡¡* ¾¡Á¿ÉÙÓÃËõд£¬µ«Èç¹û ......
¶¨ÒåÕâ¸ö¹æ·¶µÄÄ¿µÄÊÇÈÃÏîÄ¿ÖÐËùÓеÄÎĵµ¶¼¿´ÆðÀ´ÏñÒ»¸öÈËдµÄ£¬Ôö¼Ó¿É¶ÁÐÔ£¬¼õÉÙÏîÄ¿×éÖÐÒòΪ»»È˶ø´øÀ´µÄËðʧ¡££¨ÕâЩ¹æ·¶²¢²»ÊÇÒ»¶¨Òª¾ø¶Ô×ñÊØ£¬µ«ÊÇÒ»¶¨ÒªÈóÌÐòÓÐÁ¼ºÃµÄ¿É¶ÁÐÔ£©
PackageµÄÃüÃû
PackageµÄÃû×ÖÓ¦¸Ã¶¼ÊÇÓÉÒ»¸öСдµ¥´Ê×é³É¡£
ClassµÄÃüÃû
ClassµÄÃû×Ö±ØÐëÓÉ´óд×Öĸ¿ªÍ·¶øÆäËû×Öĸ¶¼Ð¡Ð´µÄµ¥´Ê×é ......