freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

java數(shù)據(jù)庫連接ppt課件-在線瀏覽

2025-06-22 13:32本頁面
  

【正文】 補(bǔ)充:基本概念 四、 JDBC常用類與方法 DriverManager類: 負(fù)責(zé)管理 JDBC驅(qū)動(dòng)程序。 方法: 1) (String driver)。 //取得對數(shù)據(jù)庫的連接。 //在已經(jīng)向 DriverManager注冊的//驅(qū)動(dòng)程序中尋找一個(gè)能夠打開 url所指定的數(shù)據(jù)庫//的驅(qū)動(dòng)程序??梢越⑷齻€(gè)非常有用的類對象。 //建立 Statement類對象 ?statement createStatement(int resultSetType,int resultSetConcurrency) throws SQLException。 2) TYPE_SCROLL_INSENSITIVE 結(jié)果集可滾動(dòng),不反映數(shù)據(jù)庫的變化。 4) resultSetConcurrency值。 6) CONCUR_UPDATABLE 能用結(jié)果集更新數(shù)據(jù)。 //建立 DatabaseMetaData類對象 3PreparedStatement prepareStatement (String sql) throws SQLException。 6boolean isClosed() throws SQLException //測試是否已經(jīng)關(guān)閉 Connection類對象對數(shù)據(jù)庫的聯(lián)機(jī)。 3)void close() throws SQLException //結(jié)束 Statement類對象對數(shù)據(jù)庫的聯(lián)機(jī)。 補(bǔ)充:基本概念 2) int executeUpdate() throws SQLException //使用 INSERT\DELETE\UPDATE對數(shù)據(jù)庫進(jìn)行新增、刪除和修改操作。 補(bǔ)充:基本概念 4)void setFloat(int parameterIndex,float x) throws SQLException //設(shè)定浮點(diǎn)數(shù)類型數(shù)值給 PreparedStatement類//對象的 IN參數(shù)。 補(bǔ)充:基本概念 6)void setString(int parameterIndex,String x) throws SQLException //設(shè)定字符串類型數(shù)值給 PreparedStatement類//對象的 IN參數(shù)。 補(bǔ)充:基本概念 8) void setTime(int parameterIndex, Time x) throws SQLException //設(shè)定時(shí)間類型數(shù)值給 PreparedStatement類對象的 IN參數(shù)。并提供一系列的方法對數(shù)據(jù)庫進(jìn)行新增、刪除和修改操作。方法如下: 1)boolean absolute(int row) throws SQLException //移動(dòng)記錄指針到指定的記錄。 3) void afterLast() throws SQLException //移動(dòng)記錄指針到最后一筆記錄之后。 5) boolean last() throws SQLException //移動(dòng)記錄指針到最后一筆記錄。 7)boolean previous() throws SQLException //移動(dòng)記錄指針到上一筆記 錄。如果是更新操作,則執(zhí)行 SQL語句后沒有結(jié)果集。 由于不是所有的數(shù)據(jù)庫服務(wù)器提供商都提供JDBC驅(qū)動(dòng)程序(給 JDBC訪問提供相應(yīng)的接口),所以就有了 JDBCODBC Bridge: 應(yīng)用程序 JDBC APIJDBCODBCODBC APIODBC層 數(shù)據(jù)源。 補(bǔ)充:基本概念 連接數(shù)據(jù)庫 ?JDBC URL 語法: jdbc:子協(xié)議 :數(shù)據(jù)庫子名稱 如: jdbc:odbc:studentdb , jdbc:dbpro:stu jdbc:odbc//:5000/stu ?建立連接 (“”)。 Connection con= (url,”user”,”pass”)。 DatabaseMetaData對象有很多方法取得數(shù)據(jù)庫的基本信息(方法如下) getURL,getUserName(),getDatabaseProduceName(),getDatabaseProduceVersion(),isRea
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1