vb.net添加数据(ACCESS)
ACCESS 主动编号(id) 现在要添加一条数据
mysql = "insert into one(河段,水位,流速,时间) values( ' " + ComboBox1.Text + " ', ' " + TextBox1.Text + " ', ' " + TextBox2.Text + " ', ' " + System.DateTime.Now.Today + " ') "
可是不能添加的 (还有一个ID字段 自动编号)
怎么回事
[解决办法]
我用的是vb.net + Access测试
mysql = "insert into one(河段,水位,流速,时间) values( ' " + ComboBox1.Text + " ', ' " + TextBox1.Text + " ', ' " + TextBox2.Text + " ', ' " + System.DateTime.Now.Today + " ') "
没有问题
下面的不行:
mysql = "insert into one values( ' " + ComboBox1.Text + " ', ' " + TextBox1.Text + " ', ' " + TextBox2.Text + " ', ' " + System.DateTime.Now.Today + " ') "