【文章內(nèi)容簡介】
。Data Source=(Local)\GSQL sql = use master RESTORE DATABASE JXC from disk=39。 amp。 amp。 39。 (sql) 39。執(zhí)行SQL語句 Next connter = MsgBox 數(shù)據(jù)庫恢復(fù)成功!!, 64, 提示信息 = True = 0End IfEnd SubPrivate Sub Command3_Click() = 備份文件(*.bak)|*.bak|文本文件(*.txt)|*.txt|ALL File(*.*)|*.* = End SubPrivate Sub Command2_Click() Unload MeEnd SubPrivate Sub Form_Load() = ( ) / 2 = ( ) / 2End Sub . 信息編輯(frmSPXXBJ)代碼:Private Sub Command1_Click()Call Main If = Or = Or = Or = Or = Or = Or = Then MsgBox 請輸入完整的商品信息, 48, 進(jìn)銷存管理系統(tǒng) Else = select spbh from GOODS where spbh = 39。 + + 39。 If 0 Then MsgBox 對不起,商品已存在, 48, 進(jìn)銷存管理系統(tǒng) Else Set adoRs = (insert into GOODS values(39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。,39。 amp。 amp。 39。)) MsgBox 添加商品成功, 48, 進(jìn)銷存管理系統(tǒng) Call cleanAll End If Refresh End If End SubPrivate Sub Command2_Click() 39。出錯 If = 修改 Then If = Then MsgBox 請輸入商品編號, 48, 進(jìn)銷存管理系統(tǒng) Else = select * from GOODS where spbh = 39。 + + 39。 If = 0 Then MsgBox 對不起,該商品不存在,請重新輸入, 48, 進(jìn)銷存管理系統(tǒng) Else = False = (spmc) = (splb) = (kc) = (dj) = (gys) = (bz) = 保存 End If End If Else If = 保存 Then Call Main Set adoRs = (update goods set spmc = 39。 + + 39。,splb = 39。 + + 39。,kc = 39。 + + 39。,dj = 39。 + + 39。,gys = 39。 + + 39。,bz = 39。 + + 39。 where spbh = 39。 + + 39。) MsgBox 信息修改成功, 48, 進(jìn)銷存管理系統(tǒng) = True = 修改 Call cleanAll End If End If End SubPrivate Sub Command3_Click() 39。已實現(xiàn) If = Then MsgBox 請輸入所要刪除的商品信息編號, 48, 進(jìn)銷存管理系統(tǒng) Else = select spbh from GOODS where spbh = 39。 + + 39。 If = 0 Then MsgBox 對不起,該商品不存在, 48, 進(jìn)銷存管理系統(tǒng) Else MsgBox 該商品刪除成功, 48, 進(jìn)銷存管理系統(tǒng) Call cleanAll End If End IfEnd SubPrivate Sub Command4_Click() Unload MeEnd SubPrivate Sub cleanAll() = = = = = = = End Sub . 商品查詢(frmSPCX)代碼:Private Sub Command1_Click() 39。有問題 If = True Then If = Then MsgBox 商品編號不可為空, 48, 進(jìn)銷存管理系統(tǒng) Else = select * from goods where spbh = 39。 + + 39。 If = 0 Then MsgBox 無該商品, 48, 進(jìn)銷存管理系統(tǒng) End If End If Else If = True Then If = Then MsgBox 商品名稱不可為空, 48, 進(jìn)銷存管理系統(tǒng) Else = select * from goods where spmc = 39。 + + 39。