VB向SQL插入记录,能成功运行,但是数据库数据没有改变
Dimmyconn1AsNewSqlConnection("InitialCatalog=电信营业厅;DataSource=.\SQLEXPRESS;"_&"Integr...
Dim myconn1 As New SqlConnection("Initial Catalog=电信营业厅; Data Source=.\SQLEXPRESS; " _
& "Integrated Security=SSPI;")
myconn1.Open()
Dim sql1 As String = "Insert Into 用户缴费信息表(用户手机号,充值时间,缴费次数,缴费卡帐号,缴费卡密码,交费金额) Values( '" & TextBox4.Text & "','" _
& TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "'," & Val(TextBox9.Text) & ")"
myconn1.Close()
MsgBox("成功充值") 展开
& "Integrated Security=SSPI;")
myconn1.Open()
Dim sql1 As String = "Insert Into 用户缴费信息表(用户手机号,充值时间,缴费次数,缴费卡帐号,缴费卡密码,交费金额) Values( '" & TextBox4.Text & "','" _
& TextBox5.Text & "','" & TextBox6.Text & "','" & TextBox7.Text & "','" & TextBox8.Text & "'," & Val(TextBox9.Text) & ")"
myconn1.Close()
MsgBox("成功充值") 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询