如何解决sqlCmd.ExecuteNonQuery() 谁能告诉我为什么当我在计算机上的 sqlite web 浏览器中创建数据库时这段代码导致此错误
Private Sub btnAddNew_Click(sender As Object,e As EventArgs) Handles btnAddNew.Click
Dim sqlConn As New sqliteConnection("Data Source=C:\Users\Salman\Documents\Visual Studio 2015\Projects\VB_Data_Entry_Form\details.db")
sqlConn.open()
Dim sqlCmd As New sqliteCommand
sqlCmd.Connection = sqlConn
sqlCmd.CommandText = "insert into details(CusRef,Firstname,Surmane,Address,Mobile,Email. Gender,dob,Nationality,Prove)
VALUES (@REC1,@REC2,@REC3,@REC4,@REC5,@REC6,@REC7,@REC8,@REC9,@REC10)"
sqlCmd.Parameters.AddWithValue("@Rec1",txtCustomerRef.Text)
sqlCmd.Parameters.AddWithValue("@Rec2",txtFirstName.Text)
sqlCmd.Parameters.AddWithValue("@Rec3",txtSurname.Text)
sqlCmd.Parameters.AddWithValue("@Rec4",txtAddress.Text)
sqlCmd.Parameters.AddWithValue("@Rec5",txtMobile.Text)
sqlCmd.Parameters.AddWithValue("@Rec6",txtAddress.Text)
sqlCmd.Parameters.AddWithValue("@Rec7",cboGender.Text)
sqlCmd.Parameters.AddWithValue("@Rec8",DateTimePicker1.Text)
sqlCmd.Parameters.AddWithValue("@Rec9",cboNationality.Text)
sqlCmd.Parameters.AddWithValue("@Rec10",cboProve.Text)
sqlCmd.ExecuteNonQuery()
sqlConn.Close()
updateTable()
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。