标题:数据库无法添加记录
只看楼主
chen3bing
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:507
专家分:104
注 册:2008-11-12
结帖率:91.22%
 问题点数:0 回复次数:1 
数据库无法添加记录
我在学数据库,买了一本书,照书上的例子操作。
有一个例子,界面如图

添加按钮代码为:
Private Sub Command5_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Adodc1.Recordset.AddNew
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = True
Command9.Enabled = True
End Sub
可是添加不上。

请问高手,如何解决?谢谢!
搜索更多相关主题的帖子: 数据库 添加 记录 Text False 
2019-02-14 16:23
chen3bing
Rank: 3Rank: 3
等 级:论坛游侠
帖 子:507
专家分:104
注 册:2008-11-12
得分:0 
Private Sub Command5_Click()

Adodc1.Recordset.AddNew
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
Command6.Enabled = False
Command7.Enabled = False
Command8.Enabled = True
Command9.Enabled = True
End Sub
改成这样就好了
2019-02-14 17:16



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-493071-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.076472 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved