【正文】
(5) = CInt() End If (7) = Trim() (4) = Set adofld = (照片) If Then Call picsavetodb(adofld, filename) End If MsgBox 修改學(xué)生信息成功!, vbOKOnly + vbExclamation, 修改學(xué)生信息Else (0) = Trim() (1) = Trim() (2) = If = True Then (3) = 1 Else (3) = 0 End If If Trim() Then (5) = CInt() End If (7) = Trim() (4) = Set adofld = (照片) If Then Call picsavetodb(adofld, filename) End If MsgBox 添加學(xué)生信息成功!, vbOKOnly + vbExclamation, 添加學(xué)生信息End If = = select * from xs,cxb where =End Sub 學(xué)生信息修改圖65 學(xué)生信息查詢圖66“查詢”按鈕的click事件添加如下的代碼Private Sub Command1_Click()Dim str As Stringstr = select * from xs,cxb where = If = And = And 所有專業(yè) Then str = select * from xs,cxb where 專業(yè)名=39。 Trim() amp。Dim s As StringDim bytedata() As ByteDim adofld As s = select * from xs where 學(xué)號(hào)=39。 39。 Trim() amp。 = select * from xs where 學(xué)號(hào)=39。 Chr(l) End IfEnd IfEnd Sub圖64“更新”按鈕的click事件添加如下的代碼:Private Sub Command1_Click()39。 Chr(j) amp。 + Trim() + 39。 + Trim() + 39。 Chr(k) amp。, connectstring, adOpenDynamic, adLockPessimistic If Not Then juese = yonghuming = Trim() mima = Trim() MsgBox 登錄成功 Unload Me Exit Sub Else MsgBox 用戶名或密碼錯(cuò)誤! = = = Randomize i = Int(Rnd * 25 + 65) j = Int(Rnd * 25 + 65) k = Int(Rnd * 25 + 65) l = Int(Rnd * 25 + 65) = Chr(i) amp。 and 密碼=39。)MsgBox 附加成功!, , XSCJUnload MeExit Subdataerr:MsgBox , , XSCJEnd Sub圖63“登錄”按鈕的click事件添加如下的代碼:Private Sub Command1_Click()If = Or = Then MsgBox 請(qǐng)輸入完整的登錄信息! Exit SubEnd IfIf = Then MsgBox 請(qǐng)輸入驗(yàn)證碼 Exit SubEnd IfDim i As Integeri = Len()If i 6 Then MsgBox 用戶名應(yīng)為六位數(shù)字, , 提示 = Exit SubEnd Ifi = Len()If i 6 Then MsgBox 密碼應(yīng)為六位, , 提示 = Exit SubEnd IfIf UCase(Trim()) Trim() Then MsgBox 驗(yàn)證碼輸入錯(cuò)誤 = Exit SubEnd IfDim sqlcon As New Dim sqlres As New Set sqlcon = New connectstringIf Then Set sqlres = New select * from dlgl where 用戶名=39。 m amp。,filename1=39。 strdata amp。Initial Catalog=master (sp_attach_db dbname=39。Persist Security Info=False。圖62“附加Server數(shù)據(jù)庫”按鈕的click事件添加如下的代碼Priva