问题描述
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 (将#修改为@)