如果你要进行数据更新的话,应该是:
Dim mycommand As New SqlCommand
mycommand.connection = mynection1
mycommand.CommandText = insersqlmynection1.Open()
mycommand.ExecuteNonQuery()
mynection1.Close()
Dim mycommand As New SqlCommand
mycommand.connection = mynection1
mycommand.CommandText = insersqlmynection1.Open()
mycommand.ExecuteNonQuery()
mynection1.Close()
mycommand.InsertCommand = New SqlCommand("INSERT INTO Customers (CustomerID, CompanyName) VALUES (@CustomerID, @CompanyName)", custConn)