看板 java 關於我們 聯絡資訊
大家好 小女研究一段時間 版本是win10 想要用apache連結到資料庫 已經做了以下方法: (1)去IIS把32位元應用程式改成允許 (2)去測試哪裡出錯 發現最終的點停在class錯誤 我學校的電腦是32位元 在學校程式都可以正常執行 一直不明白為何跑到家裡就無法執行 在家裡我也是開32位元的ODBC去系統資料庫連結 想請問大家哪裡出錯或缺少什麼組件謝謝 以下附上永遠連不上去的程式碼 type Exception report message An exception occurred processing JSP page /Ex109.jsp at line 14 description The server encoutered an internal error that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: An exception occurred processing JSP page /Ex109.jsp at line 14 11: <% 12: String JDriver = "sun.jdbc.odbc.JdbcOdbcDriver"; 13: String connectDB="jdbc:odbc:myDB"; 14: Class.forName(JDriver); 15: Connection con = DriverManager.getConnection(connectDB); 16: Statement stmt = con.createStatement(); -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 110.28.161.209 ※ 文章網址: https://www.ptt.cc/bbs/java/M.1482026271.A.02D.html
maxsho: 妳電腦有一樣的資料庫嗎 從外部要連到架在學校電腦的資料 12/18 18:36
maxsho: 連法不一樣吧 12/18 18:37
maxsho: 資料庫的驅動有抓且有放到對的位置嗎 12/18 18:50
shurou015: 資料庫是一樣的 電腦驅動程式我也在想這個問題 12/18 20:59
shurou015: 連結方法在學校也是下載apache 然後直接用ODBC去連 12/18 21:00
shurou015: 資料庫位置跟名字我都確認國沒問題 目前也比較朝電腦 12/18 21:00
shurou015: 本身設定及缺少驅動程式方向跑 謝謝你~ 12/18 21:02
kigohcy: 你家Jdk是8.0? 12/21 18:54
shurou015: 對喔 12/29 23:50
shurou015: 不能用8.0跑嗎 ? 12/29 23:51