【正文】
制 面板。 雙擊【 32位 ODBC】按鈕,打開 ODBC數(shù)據(jù)源管理器。 選擇用戶 DSN選項(xiàng)卡,單擊【添加】按鈕,彈出 “創(chuàng)建新數(shù)據(jù)源窗口 ”,要在對(duì)話框 中選擇 “Microsoft Access Driver (*.mdb)”并單擊【完成】按鈕進(jìn)入數(shù)據(jù)源設(shè)置窗口。 在數(shù)據(jù)源設(shè)置窗口中,先應(yīng)鍵入數(shù)據(jù)源名,如: Xjgl 然后在數(shù)據(jù)庫(kù)框中單擊【選取】 按鈕,打開相應(yīng)的目錄,選擇 “學(xué)籍管理 .mdb”數(shù)據(jù)庫(kù),并按【確定】返回到數(shù)據(jù)源設(shè)置窗 口中,再單擊【確定】按鈕就完成了數(shù)據(jù)源的建立任務(wù)。 如有錯(cuò)誤,可單擊【配置】重新建立數(shù)據(jù)源。 重復(fù) 2—3可建立其它數(shù)據(jù)源。 如果是 Windows2021 或 XP 系統(tǒng)則是在控制面板中選擇 “管理工 具 ”,打開ODBC數(shù)據(jù)源 管理器,按上述步驟操作即可完成。 本系統(tǒng)要求的數(shù)據(jù)源名稱與數(shù)據(jù)庫(kù)對(duì)應(yīng)關(guān)系如下: 第七章 結(jié)束語 經(jīng)過十個(gè)星期的設(shè)計(jì)和開發(fā),學(xué)籍管理信息系統(tǒng)完成了所有的工作,其功能基本上符 合用戶的需求,能夠完成學(xué)籍管理的各種任務(wù),如新生報(bào)名、班級(jí)編排、基本檔案錄入、學(xué) 生變動(dòng)、學(xué)生統(tǒng)計(jì)、升級(jí)以及各種報(bào)表的打印等任務(wù)。同時(shí)也考慮到目前尚無校園網(wǎng),所以 系統(tǒng)軟件只能在單機(jī)下運(yùn)行,原計(jì)劃使用網(wǎng)絡(luò)數(shù)據(jù) Oracle 或 SQL Server 2021系統(tǒng)暫且沒 有設(shè)計(jì)。但是在具體設(shè)計(jì)過程中,已經(jīng)考慮到將來最終要在網(wǎng)絡(luò)環(huán)境下運(yùn)行,特意使用了 ODBC 數(shù)據(jù)源,并在多處留有接口,如果用戶需要在網(wǎng)絡(luò)上運(yùn)行時(shí),只需將數(shù)據(jù)庫(kù)移植到 Oracle 或 SQL Server 2021下,相應(yīng)地修改 ODBC 數(shù)據(jù)源中具體數(shù)據(jù)庫(kù)的路徑就可直接使 用了,至于,軟件應(yīng)用程序,非特殊情況下根本不需要改動(dòng)。另一方面,由于不是在網(wǎng)絡(luò)上 運(yùn)行,為了減少數(shù)據(jù)的冗余問題,對(duì)于數(shù)據(jù)的一致性問題,也通過程序進(jìn)行了有效地解決。 但是,由于畢業(yè)設(shè)計(jì)時(shí)間較短,所以在設(shè)計(jì)過程中,難免 有小的設(shè)計(jì)錯(cuò)誤或功能上有 不盡人意的地方,比如:由于時(shí)間關(guān)系,沒有設(shè)計(jì)聯(lián)機(jī)幫助文檔,用戶操作界面不夠美觀, 程序出錯(cuò)處理不夠完善等多方面的問題,一旦運(yùn)行出錯(cuò),有時(shí)程序無法捕捉錯(cuò)誤,只能靠操 作系統(tǒng)去完成此任務(wù),這時(shí)提示信息多為英文,致使用戶難以理解,造成了系統(tǒng)中斷運(yùn)行, 常有數(shù)據(jù)丟失現(xiàn)象發(fā)生。因此,若要將該系統(tǒng)軟件投入實(shí)現(xiàn)運(yùn)用當(dāng)中,這些問題都需要作進(jìn) 行一步的改善。 另外,在這里向許多幫助和指導(dǎo)這次畢業(yè)設(shè)計(jì)的老師和同志們,表示感謝。由于時(shí)間 倉(cāng)促,在書寫設(shè)計(jì)論文時(shí)難免有出錯(cuò)之處,敬請(qǐng)諒解。 參考文獻(xiàn) [1] Visual Basic 程序開發(fā)指南 主編:趙建敏 航空工業(yè)出版社 2021年 [2] Visual Basic 開發(fā)使用手冊(cè) 主編:(美) Brian Siler Jeff Spotts 機(jī)械工業(yè)出版社 1999年 4月 [3] Oracle 與 Visual Basic 編程指南 主編:(美) Nick Snowdon 魏東 魏民 邢雷等譯 電子工業(yè)出版社 2021年 9月 [4] 附:學(xué)籍管理系統(tǒng)源程序清單 Private Sub Adodc1_MoveComplete(ByVal adReason As , ByVal pError As , adStatus As , ByVal pRecordset As ) = Record: amp。 CStr() End Sub Private Sub Command1_Click() If Then xh1 = 1 (xh) = xh1 Else xh1 = (xh) (xh) = xh1 + 1 End If End Sub Private Sub Command2_Click() If MsgBox(真的要?jiǎng)h除這條記錄嗎 ?, 4 + 32, 對(duì)不起 ) = 6 Then On Error GoTo bw1 End If Exit Sub bw1: ss = MsgBox(記錄已刪空 , 0 + 48, 對(duì)不起 ) End Sub Private Sub Command3_Click() If MsgBox(真的要全部刪除記錄嗎 ?, 4 + 32, 對(duì)不起 ) = 6 Then Dim As Dim rst1 As Set = New provider=。persist security info=false。data source=xjgl Set rst1 = (delete * from xsb ) Set = Nothing = select * from xsb Set = Adodc1 End If End Sub Private Sub Command4_Click() Unload Me End Sub Private Sub Command5_Click() End Sub Private Sub Form_Load() = 1 = 1 End Sub Private Sub Command1_Click() Dim zr(22) As Integer Dim As Dim rst1 As Dim rst2 As ?人工統(tǒng)計(jì) If = True Then nj1 = Trim() bj1 = Trim() If nj1 = Then s = MsgBox(請(qǐng)選擇年級(jí) !, 0 + 48, 對(duì)不起 ) Exit Sub End If If bj1 = Then Set = New provider=。persist security info=false。data source=xjgl Set rst2 = New = adOpenKeyset = adLockOptimistic = select * from zrtjb = Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?金城 ?) zr(1) = (hk) Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?金農(nóng) ?) zr(2) = (hk) Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?市城 ?) zr(3) = (hk) Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?市農(nóng) ?) zr(4) = (hk) Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?外城 ?) zr(5) = (hk) Set rst1 = (select count(hklb) as hk from jbxxb where nj=? amp。 nj1 amp。 ? and hklb=?外農(nóng) ?) zr(6) = (hk) Set rst1 = (select count(mz) as mz1 from jbxxb where nj=? amp。 nj1 amp。 ? and mz=?漢族 ?) zr(7) = (mz1) Set rst1 = (select count(mz) as mz1 from jbxxb where nj=? amp。 nj1 amp。 ? and mz=?回族 ?) zr(8) = (mz1) Set rst1 = (select count(mz) as mz1 from jbxxb where nj=? amp。 nj1 amp。 ? and (mz?漢族 ? and mz?回族 ?)) zr(9) = (mz1) Set rst1 = (select count(year(date())year(csny)) as nl from jbxxb where nj=? amp。 nj1 amp。 ? and (year(date())year(csny))=10) zr(10) = (nl) Set rst1 = (select count(year(date())year(csny)) as nl from jbxxb where nj=? amp。 nj1 amp。 ? and (year(date())year(csny))=11) zr(11) = (nl) Set rst1