中南大学数据库课程设计源代码文档格式.docx
《中南大学数据库课程设计源代码文档格式.docx》由会员分享,可在线阅读,更多相关《中南大学数据库课程设计源代码文档格式.docx(20页珍藏版)》请在冰点文库上搜索。
![中南大学数据库课程设计源代码文档格式.docx](https://file1.bingdoc.com/fileroot1/2023-5/7/ea6eba39-fc8d-4d09-a4c9-047ba2d09741/ea6eba39-fc8d-4d09-a4c9-047ba2d097411.gif)
select*frommember_21001where登录名='
&
txtusername.Text&
"
'
Setrs=ExeSQL(sql)
Ifrs.EOF=TrueThen
没有此用户,请重新输入用户名!
IfTrim(rs!
密码)=Trim(txtuserkey.Text)Then
登陆成功!
rs.Close
Me.Hide
frmTip.Show
UnloadMe
密码不正确,请重新输入"
txtuserkey.SetFocus
txtuserkey.Text="
EndIf
ExitSub
errhandler:
错误号"
Err.Number&
错误描述"
Err.Description
EndSub
PrivateSubcmdCancel_Click()
DimcnnAsNewADODB.Connection
DimadorsAsNewADODB.Recordset
cnn.ConnectionString="
Provider=SQLOLEDB.1;
Password=sa;
UserID=sa;
InitialCatalog=白志恒_21001;
DataSource=WIN-20120304XBO"
cnn.Open
Ifcnn.State=adStateOpenThen
Setadors.ActiveConnection=cnn'
设置cmd的ActiveConnection属性,指定与其关联的数据库连接
Setadors=cnn.Execute("
deletefromlingshi_21001"
)
cnn.Close'
关闭与数据库的连接
PrivateSubCommand1_Click()
Form2.Show
PrivateSubguanli_Click()
请输入管理员账户!
select*fromadmin_21001wherename='
对不起,该账户不是管理员账户!
Password)=Trim(txtuserkey.Text)Then
Form7.Show
PrivateSubForm_Unload(CancelAsInteger)
Adodc1.RecordSource="
select*frommember_21001"
insertintolingshi_21001select昵称,等级,积分frommember_21001where登录名='
+txtusername+"
cnn.Close'
DimstrAsString
Form2
IfText1.Text="
OrText2.Text="
OrText3.Text="
OrText4.Text="
Then
MsgBox"
输入的用户注册信息不完全!
!
,"
提示信息"
Else
select*frommember_21001where登录名='
+Text1+"
'
判断注册的用户名是否存在
Adodc1.Refresh
IfAdodc1.Recordset.RecordCount>
0Then
该账号已经存在,请您更换其他账号!
48,"
Text1.SetFocus
IfText2.Text=Text3.TextThen'
判断两次输入的密码是否一致
保存注册信息
insertintomember_21001values('
Text1.Text&
'
Text5.Text&
Text2.Text&
0'
Text4.Text&
)"
注册成功!
用户注册信息提示"
Text1.Text="
Text2.Text="
Text3.Text="
Text4.Text="
Text5.Text="
UnloadMe
Form1.Show
两次输入的密码不一致,请您确认后重新输入"
Text3.SetFocus
EndIf
PrivateSubCommand2_Click()
PrivateSubText1_KeyDown(KeyCodeAsInteger,ShiftAsInteger)
IfKeyCode=13Then
Text2.SetFocus
PrivateSubText2_KeyDown(KeyCodeAsInteger,ShiftAsInteger)
IfKeyCode=13Then'
如果按下的是回车键,则光标落到文本框当中
Text3.SetFocus
PrivateSubText3_KeyDown(KeyCodeAsInteger,ShiftAsInteger)
IfKeyCode=13Then'
Text4.SetFocus
PrivateSubText4_KeyDown(KeyCodeAsInteger,ShiftAsInteger)
IfKeyCode=13Then
CallCommand1_Click
Form3
Form4.Show
Form6.Show
PrivateSubCommand3_Click()
Form9.Show
PrivateSubCommand4_Click()
PrivateSubCommand5_Click()
Form1.Show
PrivateSubForm_Load()
str="
select*fromlingshi_21001"
Adodc4.RecordSource=str
Adodc4.Refresh
Form4
select*fromproduct_21001where"
Combo1.Text&
like'
%"
%'
Adodc1.RecordSource=str
Adodc1.Refresh
Form3.Show
orderby价格asc"
orderby价格desc"
insertintobuy_history_21001select'
Label3.Caption&
编号,品牌,型号,颜色,类别,容量,能耗,价格,'
卖家fromproduct_21001where编号='
+Text2+"
购买成功!
updatebuy_history_21001set实际价格=价格/10*(10-(select等级fromlingshi_21001))where编号='
PrivateSubCommand6_Click()
select*fromproduct_21001"
insertintotuijian_21001select'
编号,品牌,型号,颜色,类别,容量,能耗,价格,卖家fromproduct_21001where编号='
+Text3+"
谢谢您的推荐!
Combo1.AddItem"
品牌"
型号"
颜色"
类别"
价格"
Combo1.Text="
PrivateSubPicture1_Click()
Form5.Show
Form5
Form6
select*fromtuijian2_21001"
insertintotuijian2_21001values('
Text3.Text&
感谢您的推荐,我们会尽快进货!
Form7
Form8.Show
deletefromproduct_21001where编号='
删除完毕!
Dimstr1AsString
IfText2.Text="
str1="
select登录名,昵称,等级,积分,qqfrommember_21001"
str1=