使用JSP連線ORACEL資料庫做的登入框架

2021-06-16 01:16:48 字數 700 閱讀 3062

<%   // 判斷是否有錯誤資訊,如果有則列印   // 如果沒有此段**,則顯示時會直接列印null   if(request.getattribute("err")!=null)   %>

<%--使用jdbc連線oracle資料庫--%><%!string dbdriver = "oracle.jdbc.driver.oracledriver";string dburl = "jdbc:oracle:thin:@192.168.1.100:1521:yk";string dbname = "scott";string dbpass = "tiger";connection conn = null;preparedstatement pstmt = null;resultset rs = null;%><%boolean flag = false;//接收引數string name = request.getparameter("id");string password = request.getparameter("password");%> <%//連線資料庫string sql = "select name from login where name=? and password=?";try else    rs.close();   pstmt.close();   conn.close(); }catch (exception e) %>    <%//跳轉if(flag) else %>

<%}else %>

PHP連線oracel資料庫

工具 oracle資料庫 oracel11.2.0.1.0 注意要選擇對應的版本!2 解壓檔案後得到,將他們複製到 c wamp64 bin apache apache2.4.23 bin 不是c wamp64 bin php php7.0.10 ext 具體原因現在不知道。3 修改c wamp64...

jsp連線mysql小結 JSP資料庫連線方式總結

create table test test1 varchar 20 test2 varchar 20 然後向這個表寫入一條測試紀錄 那麼現在開始我們的jsp和資料庫之旅吧。一 jsp連線oracle8 8i 9i資料庫 用thin模式 testoracle.jsp如下 string url jdb...

Oracel中連線的總結(一)

資料庫版本 oracle 9i 表testa,testb,testc,各有a,b兩列 a b001 10a002 20a a b001 10b003 30b a b001 10c004 40c 連線分為兩種 內連線與外連線。a 內連線 內連線,即最常見的等值連線,例 select fromtesta...