本文介绍了当我触发插入查询时,它显示错误消息...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我触发插入查询时,它显示错误消息
when i fire insert query,it display error mesage
adp = New SqlDataAdapter("insert into tbl1 values" & "(" & TextBox1.Text & "," & "'" & TextBox2.Text & "'" & ")", cn)
adp1 = New SqlDataAdapter("insert into tbl2 values" & "(" & TextBox1.Text & "," & "'" & TextBox3.Text & "'" & "," & TextBox4.Text & ")", cn)
cmd.ExecuteNonQuery()
adp.Fill(ds, "tb1")
cmd.ExecuteNonQuery()
adp1.Fill(ds1, "tb2")
MsgBox("Record Inserted....")
错误消息....
仅当使用列列表且IDENTITY_INSERT为ON时,才能为表"tbl1"中的标识列指定一个显式值.
error message....
An explicit value for the identity column in table ''tbl1'' can only be specified when a column list is used and IDENTITY_INSERT is ON.
推荐答案
INSERT INTO tbl1 (Name,Addess,Phone) Values ('Imdad','India','91')
谢谢,
Imdadhusen
Thanks,
Imdadhusen
这篇关于当我触发插入查询时,它显示错误消息...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!