将数据从一种形式显示到另一种形式时出错

时间:2017-04-02 13:06:10

标签: datagridview combobox

从一个表单datagridview向另一个表单文本框和组合框字段显示数据时出错。错误的图像附在下面

Imports System.Data.SqlClient

Module Module1
    Public connection As SqlConnection
    Public connectionstring As String
    Public sqlinsertcommand As SqlCommand
    Public sqlviewrecord As SqlDataReader
    Public msg As Integer
    Public i, a As Integer
    Public id As Integer
    Public sql As String
    Public Sub databaseconnection()
        connectionstring = "Data Source=DESKTOP-H3IIA1D; Initial catalog=BBSRS; Integrated Security=True"
        connection = New SqlConnection(connectionstring)
        connection.Open()
    End Sub
    Public Sub connectionclose()
        connection.Close()
    End Sub
End Module

enter image description here

0 个答案:

没有答案