【文章內容簡介】
=39。 amp。 amp。 39。 Set rs = (strsql) If = True Then 39。該項目成績沒有被記錄,可以入庫 strsql3 = insert into 田賽成績 values(39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。) (strsql3) MsgBox 修改成功!, vbOKOnly, 提示 = Else strsql4 = update 田賽成績 set 成績=39。 amp。 amp。 39。 where 姓名=39。 amp。 amp。 39。 and 項目名稱=39。 amp。 amp。 39。 (strsql4) = End If單擊圖(4)中的輸出就是得出田賽項目的最終成績即得出田賽項目的名次。田賽輸出是把每個田賽項目中的前幾名的人員成績信息輸出到最終成績表中,從田賽成績中的開始查找田賽項目,則從田賽成績表中把從項目名單中查找到的項目的前幾名成績信息輸出到最終成績表中。然后再從田賽成績中查找下一個田賽項目,再把該項目的前幾名輸出到最終成績表中,以此循環(huán)直到田賽成績中的項目全部查完。輸出部分的代碼如下:strsql6 = select 每項目取的名次 from 參數(shù)表Set rs = (strsql6)strsql = select distinct 項目名稱 from 田賽成績Set rs1 = (strsql)i = 0Do While Not strsql1 = select * from 田賽成績 where 項目名稱=39。 amp。 (0) amp。 39。order by 成績 desc Set rs2 = (strsql1) For j = 0 To Val((0)) 1 strsql3 = select * from 最終成績 where 姓名=39。 amp。 (0) amp。 39。 and 項目名稱=39。 amp。 (1) amp。 39。 Set rs = (strsql3) If Then strsql0 = select 分數(shù) from 名次分數(shù)表 where 名次= amp。 j + 1 amp。 Set rs5 = (strsql0) strsql2 = insert into 最終成績(姓名,項目名稱,成績,名次,分數(shù)) values(39。 amp。 (0) amp。 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 + 1Loop 查詢輸出查詢輸出模塊中有七種不同的查詢:運動員成績查詢、代表隊成績查詢、項目成績查詢、總分表、項目名次表、成績名次表和成績匯冊。這些查詢都是使用SQL語句進行查詢,不同的就是SQL語句中的條件不同面已,因此在代碼方面都差不多,如項目成績查詢。項目成績查詢界面如圖45所示。圖45 查詢界面從圖(5)中的項目名稱中選擇一個項目,然后單擊查詢就會輸出該項目的所有運動員的比賽成績。部分代碼如下:If = Then MsgBox 請選擇項目名稱!, vbOKOnly, 提示Elsestrsql = select 項目類型 from 運動項目名單 where 項目名稱=39。 amp。 amp。 39。Set rs = (strsqlIf (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 WithEnd IfEnd if上述代碼只是實現(xiàn)選擇的項目是田賽項目的成績輸出,選擇的項目是徑賽項目和全能項目這里就不列出來了。實現(xiàn)項目成績查詢首先選擇項目名稱再查詢,先判斷選擇的項目是哪一種類型的項目,如果是全能項目或田賽項目則第一行是姓名、項目名稱和成績,如果是徑賽項目第一行就是姓名、項目名稱、初賽成績、預賽成績和決賽成績,從第二行開始就是該項目所有運動員的成績信息。 系統(tǒng)工具系統(tǒng)工具是為本系統(tǒng)服務的工具,方便本系統(tǒng)的使用。如數(shù)據(jù)庫備份與恢復就是為了防止系統(tǒng)的數(shù)據(jù)庫出現(xiàn)錯誤,可以通過還原數(shù)據(jù)庫來修正這個錯誤。而數(shù)據(jù)表的瀏覽是讓人清楚數(shù)據(jù)庫中有哪些表及表的屬性,讓人更清楚明白數(shù)據(jù)庫表的結構。這里就以數(shù)據(jù)庫備份與還原為例,界面如圖46和47所示 圖46備份與還原界面 圖47 備份完成界面只要單擊下圖(6)中備份或恢復即可完成備份或恢復操作。圖(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, InfoMsgBox 備份數(shù)據(jù)庫成功!, vbInformation, 提示結束語本系統(tǒng)是在Windows XP的環(huán)境下設計和調試的,并安裝有Visual Basic開發(fā)工具和Microsoft Office Access數(shù)據(jù)庫。經過調試證明:1.本系統(tǒng)能滿足學校田徑運動會的需求,在錄入的報名和比賽成績數(shù)據(jù)準確的情況下,就能保證結果準確。不需要反復核對,減少了大量重復操作。2.軟件功能強大,系統(tǒng)運行穩(wěn)定,而且軟件處理的速度快,能夠保證實時的數(shù)據(jù)處理,滿足隨時信息查詢的需求。3.由于水平和時間有限,本系統(tǒng)還有些不足之處,比如在比賽中的運動員成績采用了四舍五入的方法。不支持格式轉換和在線打印功能。參考文獻[1] 鄭海春,謝維成. Visual [2] 王新民. Visual [3]—Visual [4] 薩師煊. [5] 張平. [6] 趙國玲,[7] 叢明禮. [8] 李老民. 致 謝經過一個多月的調研、設計和開發(fā),這套學校田徑運動會管理系統(tǒng)已基本結束。在本次畢業(yè)設計中,我從指導老師陳木生老師身上學到了很多東西,陳老師認真負責的工作態(tài)度、嚴謹治學的精神和深厚的理論水平都使我受益匪淺;同時我還要感謝同學對我的幫助,指出我的錯誤及不妥之處,進一步完善我的畢業(yè)設計。無論在理論上還是在實踐中,他們都給予我很大的幫助,使我的應用水平得到了很大的提高,這對于我以后的工作和學習都有一種巨大的幫助。今后的工作中,我將充分運用自己所學的計算機知識,并在工作中不斷學習和完善,充分發(fā)揮一名計算機專業(yè)人員的作用,為企業(yè)的騰飛和發(fā)展貢獻自己的力量。 39。Go away! You mustn39。t look.39。I hesitated, but childhood is a time thickly beset with inprehensible, 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 would 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 fo39。Yes,39。 I told her. And I added: 39。I think she39。s awfully brave, too. It must have hurt a lot.39。39。Will you keep a secret — an important secret — for her sake?39。 she asked.39。Yes — of course,39。 I agreed, but a little uncertain in my tone for not realizing what the secret was.with a long summer day EXCURSION TO THE HOLY LAND, EGYPT, THE CRIMEA, GREECE, AND INTERMEDIATE POINTS OF INTEREST. BROOKLYN, February 1st, 1867 The undersigned will make an excursion as above during the ing season, and begs to submit to you the following programme:Ghkgrt, including lib