问题描述
- 如何VB实现sql server表里添加数据?
-
Public Class 图书信息添加
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim str4 As String
Dim a As Integer
Dim b As IntegerPrivate Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
就差这里的代码了啊!跪求大神啊!
我用数据源添加的 ,好像不用代码也能链接,可是怎么才能执行SQL语句啊MsgBox("添加成功!") Me.Hide() 主窗口.Show() End Sub Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Me.Hide() 主窗口.Show() End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged '图书编号 str1 = TextBox1.Text End Sub Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged '作者 str3 = TextBox3.Text End Sub Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged '书名 str2 = TextBox2.Text End Sub Private Sub TextBox4_TextChanged(sender As Object, e As EventArgs) Handles TextBox4.TextChanged '价格 b = TextBox4.Text End Sub Private Sub TextBox5_TextChanged(sender As Object, e As EventArgs) Handles TextBox5.TextChanged '时间上限 a = TextBox5.Text End Sub Private Sub TextBox6_TextChanged(sender As Object, e As EventArgs) Handles TextBox6.TextChanged '类别 str4 = TextBox6.Text End Sub Private Sub 图书信息添加_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub
解决方案
http://blog.sina.com.cn/s/blog_4ae5e6890100d4f5.html
http://www.cnblogs.com/jiaxiaoai/archive/2011/08/04/2127120.html
http://blog.csdn.net/lqh4188/article/details/17652433
解决方案二:
VB.NET将EXCEL中的数据导入到SQL SERVER
往SQL Server数据库中添加图片(VB.NET)
VB实现SQL Server数据库备份/恢复
时间: 2024-10-31 14:26:24