【正文】
AS IF EXISTS ( SELECT * FROM employee WHERE emp_name like 39。,16,1) ROLLBACK RETURN END設(shè)計(jì)體會(huì)與建議:在起初,我們根本不知道該如何著手,VB是我們接觸不多的軟件,我們對(duì)它的應(yīng)用,它的語(yǔ)言,它各種代碼的使用都不是很了解。因此要設(shè)計(jì)出一個(gè)比較完整的數(shù)據(jù)庫(kù),就要在摸索中不斷的學(xué)習(xí),同時(shí)也要能過(guò)網(wǎng)絡(luò)資源與圖書(shū)資源進(jìn)行強(qiáng)化,這也是我在這次設(shè)計(jì)過(guò)程中最大的收獲。此次課程設(shè)計(jì)過(guò)程中,在收獲知識(shí),提高能力的同時(shí),我也學(xué)到了很多人生的哲理,懂得怎么樣去制定計(jì)劃,怎么樣去實(shí)現(xiàn)這個(gè)計(jì)劃,并掌握了在執(zhí)行過(guò)程中怎么樣去克服心理上的不良情緒。這次的學(xué)習(xí)實(shí)踐過(guò)程中,我充分了解到團(tuán)隊(duì)的重要性,我們一組四個(gè)人開(kāi)始并沒(méi)有很明確的分工,但是大家都共同解決這每一個(gè)發(fā)現(xiàn)的問(wèn)題,在辛苦中也品嘗著樂(lè)趣。 由于是第一次設(shè)計(jì)數(shù)據(jù)庫(kù)系統(tǒng),我們期間也遇到了種種困難,比如姓名中不能出現(xiàn)數(shù)字、存儲(chǔ)過(guò)程及觸發(fā)器的使用等。 ) BEGIN RAISERROR(39。部門(mén) strSql = Select dept_id,dept_name from department Order By dept_id strSql, dbConn, adOpenForwardOnly, adLockReadOnly Do While Not ((dept_name).Value) () = (dept_id).Value Loop = 0 End Sub系統(tǒng)特色:有較強(qiáng)的數(shù)據(jù)完整性、安全性設(shè)計(jì)1)系統(tǒng)中按鈕中基本都設(shè)置了錯(cuò)誤陷阱語(yǔ)句:On Error GoTo ERR_CONNERR_CONN: MsgBox 請(qǐng)檢查輸入的數(shù)據(jù)是否有效所以系統(tǒng)一般不會(huì)出現(xiàn)輸入導(dǎo)致系統(tǒng)崩潰現(xiàn)象。設(shè)置各列的對(duì)齊方式 For i = 0 To 9 (i) = 0 Next i 39。 \)39。 order by strSql, dbConn, adOpenForwardOnly, adLockReadOnly = 1 If Then Else 39。 amp。打開(kāi)一個(gè)數(shù)據(jù)集 strSql = select , from checkin a ,employee b,department c where = and = amp。 cboCheckYear amp。 39。,39。 amp。 cboCheckYear amp。 09 amp。 39。,39。 amp。 cboCheckYear amp。 06 amp。 39。,39。 amp。 cboCheckYear amp。 02 amp。 39。指定年份的任意月 strCheck = and in (39。 Year(Date) 1 amp。 cboCheckMonth amp。年月都為空時(shí) strCheck = Else 39。 cboDept amp。 39。 End If 39。按工號(hào)查詢(xún) If Len(Trim(MskId)) = 0 Then strId = Else strId = and = 39。設(shè)置列寬 (0) = 1000 (1) = 0 (2) = 1400 (3) = 800 (4) = 1400 (5) = 1400 (6) = 1400 (7) = 1410 39。職務(wù) strSql = Select duty_id,duty_name from duty Order By duty_id strSql, dbConn, adOpenForwardOnly, adLockReadOnly Do While Not ((duty_name).Value) () = (duty_id).Value Loop = 0 39。 條記錄 End If Exit Sub ERR_CONN: MsgBox 請(qǐng)檢查輸入的數(shù)據(jù)是否有效End SubPrivate Sub Command3_Click() Unload MeEnd SubPrivate Sub Form_Load() 39。 strSex amp。 strDuty amp。 strTitle amp。 strName amp。 End If 39。 End If If = 0 Then strSex = Else strSex = and =39。 End If If = 0 Then strEdu = Else strEdu = and =39。 End If If = 0 Then strDuty = Else strDuty = and =39。 End If If = 0 Then strTitle = Else strTitle = and =39。 End If If = 0 Then strDept = Else strDept = and =39。 End If If Trim(Text2) = Then strName = Else strName = and =39。設(shè)置錯(cuò)誤陷阱 On Error GoTo ERR_CONN If Trim(MskId) = Then strId = Else strId = and = 39。 5 應(yīng)用程序設(shè)計(jì)員工信息管理系統(tǒng)基于用戶(hù)驗(yàn)證登錄的方式實(shí)現(xiàn)員工個(gè)人信息管理和員工考勤信息管理。 雙擊“數(shù)據(jù)源(ODBC)”,打開(kāi)“ODBC數(shù)據(jù)源管理器”對(duì)話(huà)框,如圖()所示。Database=man。Database=man。錯(cuò)誤!姓名中不可出現(xiàn)數(shù)字39。關(guān)系圖 建立數(shù)據(jù)庫(kù)Create table employee(emp_id int(4) not null,emp_name nvarchar(20) not null,sex nvarchar(2) not null,birthday smaldatetime(4) not null,native nvarchar(20),profession nvarchar(20),edu_id int(4),not null,title_id int(4),not null,dept_id int(4),not null,duty_id int(4),not null,emp_date1 smaldatetime(4),not null,emp_date2 smald