【正文】
p。 39。,39。 amp。 (1) amp。 39。,39。 amp。 (2) amp。 39。,39。 amp。 j + 1 amp。 39。,39。 amp。 (0) amp。 39。) (strsql2) End If Next i = i + 1 Loop 查詢輸出 查詢輸出模塊中有七種不同的查詢:運動員成績查詢、代表隊成績查詢、項目成績查詢、總分表、項目名次表、成績名次表和成績匯冊。這些查詢都是使用 SQL語句進行查詢,不同的就是 SQL語句中的條件不同面已,因此在代碼方面都差不多,如項目成績查詢。項目成績查詢界面如圖 45所示。 圖 45 查詢界面 從圖 (5)中的項目名稱中選擇一個項目,然后單擊查詢就會輸出該項目的所有運動員的比賽成績。部分代碼如下: If = Then MsgBox 請選擇項目名稱 !, vbOKOnly, 提示 Else strsql = select 項目類型 from 運動項目名單 where 項目名稱 =39。 amp。 amp。 39。 Set rs = (strsql If (0) = 田賽項目 Then strsql1 = select * from 田賽成績 where 項目名稱 =39。 amp。 amp。 39。 Set rs1 = (strsql1) With MSHFlexGrid1 39。詳細查詢的信息顯示 .Rows = 2 .CellAlignment = 4 .TextMatrix(0, 0) = 姓名 .TextMatrix(0, 1) = 項目名稱 .TextMatrix(0, 2) = 成績 Do While Not .Rows = .Rows + 1 .CellAlignment = 4 .TextMatrix(.Rows 2, 0) = (0) .TextMatrix(.Rows 2, 1) = Trim((1)) .TextMatrix(.Rows 2, 2) = (2) Loop 39。.Rows = .Rows 1 End With End If End if 上述代碼只是實現(xiàn)選擇的項目是田賽項目的成績輸出,選擇的項目 是徑賽項目和全能項目這里就不列出來了。實現(xiàn)項目成績查詢首先選擇項目名稱再查詢,先判斷選擇的項目是哪一種類型的項目,如果是全能項目或田賽項目則第一行是姓名、項目名稱和成績,如果是徑賽項目第一行就是姓名、項目名稱、初賽成績、預(yù)賽成績和決賽成績,從第二行開始就是該項目所有運動員的成績信息。 系統(tǒng)工具 系統(tǒng)工具是為本系統(tǒng)服務(wù)的工具,方便本系統(tǒng)的使用。如數(shù)據(jù)庫備份與恢復(fù)就是為了防止系統(tǒng)的數(shù)據(jù)庫出現(xiàn)錯誤,可以通過還原數(shù)據(jù)庫來修正這個錯誤。而數(shù)據(jù)表的瀏覽是讓人清楚數(shù)據(jù)庫中有哪些表及表的屬性,讓人更清楚明白數(shù)據(jù)庫表 的結(jié)構(gòu)。這里就以數(shù)據(jù)庫備份與還原為例,界面如圖 46和 47所示 圖 46備份與還原界面 圖 47 備份完成界面 只要單擊下圖 (6)中備份或恢復(fù)即可完成備份或恢復(fù)操作。圖 (7)就是完成了數(shù)據(jù)庫備份成功后的界面。備份數(shù)據(jù)庫就是把系統(tǒng)中的數(shù)據(jù)庫壓縮拷貝到另外的路徑文件下面。 Dim FileName As String Dim FileBack As String Dim Info As String FileName = mypath amp。 FileBack = mypath amp。 backup/ Info = 正在備份數(shù)據(jù)庫 amp。 FileName BackupDatabase FileName, FileBack, Info MsgBox 備份數(shù)據(jù)庫成功! , vbInformation, 提示 結(jié)束語 本系統(tǒng)是在 Windows XP的環(huán)境下設(shè)計和調(diào)試的,并安裝有 Visual Basic開發(fā)工具和Microsoft Office Access數(shù)據(jù)庫 。經(jīng)過調(diào)試證明: 1. 本系統(tǒng)能滿足學(xué)校田徑運動會的需求,在 錄入的報名和比賽成績數(shù)據(jù)準確 的情況下 ,就能保證結(jié)果準確。不需要反復(fù)核對, 減少了大量重復(fù)操作 。 2. 軟件功能強大,系統(tǒng)運行穩(wěn)定,而且 軟件處理的速度快, 能夠 保證實時的數(shù)據(jù)處理,滿足隨時信息查詢的 需 求。 3.由于水平和時間有限,本系統(tǒng)還有些不足之處,比如在比賽中的運動員成績采用了四舍五入的方法。不支持格式轉(zhuǎn)換和在線打印功能。 參考文獻 [1] 鄭海春,謝維成 . Visual Basic編程及實例分析教程 .清華大學(xué)出版社 .2020 [2] 王新民 . Visual Basic程序設(shè)計與數(shù)據(jù)庫應(yīng)用 .電子工業(yè)出版社 .2020 [3]吳永琢 .看實例學(xué)編程 — Visual Basic程序設(shè)計 .西安電子科技大學(xué)出版社 .2020 [4] 薩師煊 . 數(shù)據(jù)庫系統(tǒng)概論 .高等教育出版社 .2020 [5] 張平 . 數(shù)據(jù)庫應(yīng)用基礎(chǔ) .2020 [6] 趙國玲,咎玲 .ACCESS數(shù)據(jù)庫應(yīng)用 .機械工業(yè)出版社 .2020 [7] 叢明禮 . 田徑競賽規(guī)則 .人民體育出版社 .2020 [8] 李老民 . 田徑競賽 裁判工作手冊 .北京體 育大學(xué)出版社 .2020 致 謝 經(jīng)過一個多月的調(diào)研、設(shè)計和開發(fā),這套 學(xué)校田徑運動會管理系統(tǒng) 已基本結(jié)束。在本次畢業(yè)設(shè)計中,我從指導(dǎo)老師陳木生老師身上學(xué)到了很多東西,陳老師認真負責(zé)的工作態(tài)度、嚴謹治學(xué)的精神和深厚的理論水平都使我受益匪淺 ; 同時我還要感謝同學(xué)對我的幫助,指出我的錯誤及不妥之處,進一步完善我的畢業(yè)設(shè)計。 無論在理論上還是在實踐中,他 們 都給予我很大的幫助,使我 的 應(yīng)用水平得到了很大的提高,這對于我以后的工作和學(xué)習(xí)都有一種巨大的幫助。今后的工作中,我將充分運用自己所學(xué)的計算機知 識,并在工作中不斷學(xué)習(xí)和完善,充分發(fā)揮一名計算機專業(yè)人員的作用,為企業(yè)的騰飛和發(fā)展貢獻自己的力量。 39。Go away! You mustn39。t look.39。 I hesitated, but childhood is a time thic kly beset with in prehensible, though important, conventions, so I withdrew a few yards and turned my back. I heard her breathing hard. Then she was crying again. I turned round. 39。I can39。t,39。 she said, looking at me fearfully through her tears, so I knelt down to see what I could do about it. 39。You mustn39。t ever tell,39。 she said. 39。Never, never! Promise?39。 I promised. She was very brave. Nothing more than the puppy noises. When I did succeed in getting the foot free, it looked queer: I mean, it was all twisted and puffy I didn39。t even notice then that it had more than the usual number of toes. . . . I managed to hammer the shoe out of the cleft, and handed it to her. But she found she could not put it on her swollen foot. Nor could she put the foot to the ground. I thought I might carry her on my back, but she was heavier than I expected, and it was clear that we should not get far like that. 39。I39。ll have to go and fetch somebody to help,39。 I told her. 39。No. I39。ll crawl,39。 she said. I walked beside her, carrying the shoe, and feeling useless. She kept going gamely for a surprisingly long way, but she had to give it up. Her trousers were worn through at the knees, and the knees themselves were sore and bleeding. I had never known anyone, boy or girl, who w ould have kept on till that pitch。 it awed me slightly. I helped her to stand up on her sound foot, and steadied her while she pointed out where her home was, and the trickle of smoke that marked it. When I looked back she was on all fours again, disappearing into the bushes. I found the house w ithout much difficulty, and knoc ked, a little nervously. A tall woman answered. She had a fine, hand some face with large bright eyes. Her dress was russet and a little shorter than those most of the women at home wore, but it carried the conventional cross, from neck to hem and breast to breast, in a green that matched the scarf on her head. 39。Are you Sophie39。s mother?39。 I asked. She looked at me sharply and frowned. She said, with anxious abruptness: 39。What is it?39。 I told her. 39。Oh!39。 she exclaimed. 39。Her foot!39。 She looked hard at me again for a moment, then she leant the broom she was holding against the wall, and asked briskly: 39。Where is she?39。 I led her by the way I had e. At the sound of her voice Sophie crawled out of the bushes. Her mother looked at the swollen, misshapen foot and the bleeding knees. 39。Oh, my poor darling!39。 she said, holding her and kissing her. Then she added: 39。He39。s seen it?39。 39。Yes,39。 Sophie told her. 39。I39。m sorry, Mummy. I tried hard, but I couldn39。t do it myself, and it did hurt so.39。 Her mother nodded slowly. She sighed. 39。 Oh, well, it can39。t be helped now. Up you get.39。 Sophie climbed on to her mother39。s back, and we all went back to the house together. The mandments and precepts one learns as a child can be remembered by rote, but they mean little until there is exa