【正文】
d If,往往會因為不能往數(shù)據(jù)庫里添加空值而出現(xiàn)“實時錯誤‘3265’:項目在所需的名稱或序數(shù)中未被發(fā)現(xiàn)?!?”無法將NULL值插入到列‘ ‘表‘ ‘中,該列不允許空值,INSERT失敗”解決這個問題需要在插入之前先進行判斷,需要插入的值用戶輸入沒有,如沒有輸入則提示輸入,然后再進行插入操作就可以了,其代碼實現(xiàn)如下:現(xiàn)舉例要將text1的值插入到數(shù)據(jù)庫”姓名”列中,那么在插入前先判斷,編寫代碼如下:If = Then提示信息,姓名不能為空,請重新填寫!SendKeys {Home}+{End}Else(姓名) = End If 操作的調(diào)試為了使軟件應用起來方便快捷,操作快速,本系統(tǒng)絕大部分操作都是直接的鍵盤操作,如:按下回車鍵后,焦點應落到控件3上,而按照程序中控件的TabIndex屬性,編碼如下:在類似的操作之前,在該控件的鍵盤事件下編碼如下:Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)End Sub上述例子就是指在Command1獲得焦點后,按下回車鍵,焦點會自動跳到Command2上,使Command2獲得當前焦點,進行操作. 系統(tǒng)調(diào)試調(diào)試前,清空數(shù)據(jù)庫中的所有數(shù)據(jù);然后,輸入少量的數(shù)據(jù)進行調(diào)試。調(diào)試首先從數(shù)據(jù)維護模塊開始,在輸入初始數(shù)據(jù)時,發(fā)現(xiàn)許多關于方便用戶操作的問題,比如,當前日期的輸入,可以直接獲取系統(tǒng)的日期,不用用戶手工輸入;,比如藥品信息已經(jīng)在數(shù)據(jù)庫中存在,只要用戶輸入其中的一項,那么其他項就應該自動從數(shù)據(jù)庫中提出來,節(jié)省用戶的時間,方便用戶查看; 在調(diào)試查詢模塊時,發(fā)現(xiàn)對字符串的比較存在大小寫之分,兩個數(shù)據(jù)比較存在類型是否一致問題,所以要先將要比較的兩個數(shù)據(jù)轉(zhuǎn)化成相同的格式,然后再進行比較;如果查詢的結(jié)果為空,那么應該給出提示信息(如:”沒有您所要查找的信息!請重新輸入!”等),這樣才能正真做到人機界面友好。 由于時間和本人能力的有限,調(diào)試過后也難免會有錯誤,設計所達到的總體水平還有很多不盡人意之處,希望學校老師領導能提出寶貴意見,通力完善!第7章 結(jié) 論轉(zhuǎn)眼之間,三個月的畢業(yè)設計已接近尾聲,我現(xiàn)在感覺自己長大了很多,也學到了很多,當然也自信了很多。之前,對于編程,我對自己不自信,雖然平時學習挺好,但對于編程方面卻沒有很大的興趣。在畢業(yè)設計之前,也從來沒有系統(tǒng)的去學過什么,可是經(jīng)過三個月的畢設,我驚奇的發(fā)現(xiàn)原來自己在這一方面也可以做得很好,雖然在有些方面仍有欠缺,但我已經(jīng)不再害怕,我相信自己可以做得很好,這一點是在這次畢設中得到最多的東西,我想應該也是在大學期間里學得最多的東西。在這次畢設期間,除了上面提到的,以下幾點也是深有體會的:,然后對系統(tǒng)的分析,設計以及對軟件開發(fā)環(huán)境的熟悉,以至到編碼、測試,調(diào)試,到最終的完成,我清楚了軟件設計的整個過程,對于這些不再陌生,培養(yǎng)了自己嚴謹?shù)倪壿嬎季S。,所以在這一過程中,不僅僅是學到了專業(yè)知識,而且了解到了很多關于藥店方面和醫(yī)療技術(shù)方面的知識。,增強了自己的動手能力,對于電腦的操作比以前又熟練了很多。,經(jīng)過這一階段,自己的分析問題,解決問題的能力也有了很大的提高??傊?jīng)過這三個月的學習,我又自信了很多,相信這一階段的努力會為我以后的發(fā)展做一個良好的鋪墊,為將來走上工作崗位打下了良好的基礎,我將繼續(xù)堅持不懈的努力。參考文獻[1] Server 2000 ,2003.[2] 敬錚, Basic ,2002.[3] 薩師煊,(第三版).,2002.[4] (修訂版).,1992. [5] 劉瑞新,崔淼著. Visual Basic ,2003.[6] 周靄如,官士鴻,林偉健著. Visual Basic ,2003.[7] 段興主編. Visual Basic ,2002.[8] 李曉黎,張巍著. Visual Basic + SQL Server ,2003.[9] Server 2000 ,2002.[10](美)Mike Gunderloy 著, Basic 開發(fā)指南(ADO).,2001.[11] 王棟. Visual Basic課程設計. ,2001[12] 衛(wèi)振林、 . 機械工業(yè)出版社 2001[13] Brian Siler, Jeff Spots. Microsoft Visual Basic , 2001[14] Michael Halvorson. Microsoft Visual Basic ,2001[15] Server 2000 ,2002致 謝本系統(tǒng)在設計中本著最大限度地減少操作人員的冗余思考、選擇和動作,使操作人員盡可能的擺脫傳統(tǒng)工作的物理細節(jié),直觀而且容易掌握整個系統(tǒng)的工作過程的宗旨,經(jīng)多次修改完善并和老師同學多次討論商量,最終按期完成了。設計期間,承蒙我系多位教師和同學的幫助和指點,特別感謝指導教師趙凱老師多次在百忙之中抽出時間親臨指點,為設計提供了極大的幫助,才達到今天的設計成果。其次,感謝系里的領導和各位老師,在畢設過程中給我們提供了一個良好的環(huán)境,讓我們安心進行畢業(yè)設計。在這里尤其感謝實驗室的各位老師,每天不辭辛勞的為我們服務,衷心的感謝。當然也感謝在此期間給過我?guī)椭耐瑢W和朋友。他們?yōu)槲姨峁┝嗽S多學習資料,讓我在學習數(shù)據(jù)庫編程的時候,不明白的地方可以查詢。對于我的畢設,他們也給我提出了很多可行性的建議。同時也感謝CSDN(程序員大本營)上的一些朋友,在我程序調(diào)試的過程中,給我解決了很多疑難問題,也讓我學到了很多畢設以外的關于VB、SQL以及數(shù)據(jù)庫設計和網(wǎng)絡等方面的知識。在此,我由衷的感謝他們!謝謝!附 錄英文文獻Leverage Microsoft SQL Server 2000 Skills to Learn DB2 UDB Version 81. IntroductionIn the world of information technology today, we are constantly bombarded with new information new software products, new versions, new features. Leveraging your current knowledge is one way to keep up with this constant change. I39。ll show you how you can use your current knowledge of Microsoft174。 SQL Server 2000 to quickly gain skills in DB2 UDB for Linux, UNIX, and Windows Version 8. In this article, I use the term SQL Server to refer to Microsoft SQL Server 2000 and DB2 UDB to refer to DB2 UDB for Linux, UNIX, and Windows Version 8. The focus of the article will be mainly on the Windows platform.The first important difference to note between SQL Server and DB2 UDB is that SQL Server is only supported on the Windows platforms (Intel architecture). DB2 UDB, on the other hand, is supported on Linux, UNIX and Windows platforms and in a variety of hardware architectures. The code for all of these platforms is essentially the same with very minor platformspecific modules. In addition, the DB2 UDB product extends to the iSeries?(AS/400? and z/OS?(mainframe) world. The iSeries and z/OS DB2 UDB members do not have the same code base as DB2 UDB for Linux, UNIX and Windows because those products leverage their respective hardware architectures. However, functionality across the DB2 family is very similar. After you are fortable with DB2 UDB for Linux, UNIX and Windows, you can venture out and learn more about DB2 on these other platforms. See the resources section for more articles on how you can continue building your skills.2. Overview of the system structuresFigure 1 below shows the basic SQL Server structure. Compare it with Figure 2, which shows the structure of DB2 UDB. I39。ll be referring to these figures throughout the article.Figure 1. Microsoft SQL Server 2000 structureFigure 2. DB2 UDB system structure on Linux, UNIX, and Windows Version 8 and serversThe concept of an instance is similar in SQL Server as in DB2 UDB, although the term instance is not used often in SQL Server terminology. Normally, users simply refer to it as a server. For both products, an instance provides an independent environment in which database objects are created, and applications are run on those objects. Instances follow a sharednothing architecture, and thus objects from one instance do not normally interact with objects from another instance. Figures 1 and 2 show the PROD and DEV instances as conceptually two separate boxes. Though the concept of an instance is the same on both products, its implementation is quite different. In SQL Server you can have the default instance (only one) and named instances. A default instance is the instance created on first installation of SQL Server and can be identified by the puter name. A named instance, on the other hand, is an instance created after the default instance has been created and has to be identified in the format puter_name\\instance_name.To create several SQL Server named instances on the same machine, you must use the installation CD for each new instance, and you use the install GUI for each new installation. Note that in this process, you will be copying the SQL Server code for each instance you create, though in different paths. Only some files are shared between instances. To drop an instance you must uninstall the instance using the install GUI. In DB2 UDB,