用jsp編寫的網(wǎng)上測(cè)試系統(tǒng)。
(1)以“Windows身份驗(yàn)證模式”連接SQL Server數(shù)據(jù)庫。
(2)需要安裝SQL Server 的補(bǔ)丁SP3。
(3)運(yùn)行的時(shí)候可以參照書上的說明進(jìn)行,如出試卷的時(shí)候,若試卷標(biāo)題重復(fù),可以從數(shù)據(jù)庫中刪除,然后添加試卷。
(4)出試卷路徑為 http://localhost:8080/chap22/chujuan.jsp 如果放在根目錄,則路徑和書上的界面一樣。
(5)選擇題路徑為 http://localhost:8080/chap22/xuanzeti.jsp
(6)判斷題路徑為 http://localhost:8080/chap22/panduanti.jsp
(7)如果采用本應(yīng)用中連接數(shù)據(jù)庫的方法調(diào)試不通,可以參照20章中通過ODBC連接數(shù)據(jù)庫的方法來修改
將以下代碼:
Class.forName("com.microsoft.jdbc.sqlserver.SqlserverDriver")
String driver = "jdbc:microsoft:sqlserver://localhost:1433"
Connection conn = DriverManager.getConnection(driver,"","")
修改成:
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver")
String driver = "jdbc:odbc:try"
Connection conn = DriverManager.getConnection(driver,"sa","")
//如果是windows驗(yàn)證,則不用用戶名和密碼
標(biāo)簽:
Server
SQL
Windows
jsp
上傳時(shí)間:
2015-06-27
上傳用戶:450976175