VB向SQL SERVER 2008中添加记录问题
Adodc1.Recordset.MoveLastAdodc1.Recordset.AddNewAdodc1.Recordset.Fields("名称")=Text1.T...
Adodc1.Recordset.MoveLast
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("名称") = Text1.Text
Adodc1.Recordset.Fields("规格") = Text2.Text
Adodc1.Recordset.Fields("单位") = Text3.Text
Adodc1.Recordset.Fields("类型") = Text7.Text
Adodc1.Recordset.Fields("期初") = 0
Adodc1.Recordset.Fields("结存") = 0
Adodc1.Recordset.Fields("公斤") = 0
Adodc1.Recordset.Fields("累计入库") = 0
Adodc1.Recordset.Fields("累计出库") = 0
Adodc1.Recordset.Fields("新增") = "是"
Adodc1.Recordset.Fields("新增日期") = Date
Adodc1.Recordset.Update
Adodc1.RecordSource = "select ID,名称,规格,单位,类型,期初,结存,公斤,累计入库,累计出库,新增,新增日期 from " & kuming & ""
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset
DataGrid1.Refresh
请问为什么有的时候记录不是在最后添加呢?而是在中间的某行。求高手帮助 展开
Adodc1.Recordset.AddNew
Adodc1.Recordset.Fields("名称") = Text1.Text
Adodc1.Recordset.Fields("规格") = Text2.Text
Adodc1.Recordset.Fields("单位") = Text3.Text
Adodc1.Recordset.Fields("类型") = Text7.Text
Adodc1.Recordset.Fields("期初") = 0
Adodc1.Recordset.Fields("结存") = 0
Adodc1.Recordset.Fields("公斤") = 0
Adodc1.Recordset.Fields("累计入库") = 0
Adodc1.Recordset.Fields("累计出库") = 0
Adodc1.Recordset.Fields("新增") = "是"
Adodc1.Recordset.Fields("新增日期") = Date
Adodc1.Recordset.Update
Adodc1.RecordSource = "select ID,名称,规格,单位,类型,期初,结存,公斤,累计入库,累计出库,新增,新增日期 from " & kuming & ""
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1.Recordset
DataGrid1.Refresh
请问为什么有的时候记录不是在最后添加呢?而是在中间的某行。求高手帮助 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询