从一个表单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