vb.net を使用して SQL サーバーに接続しようとしていますが、次のエラーが発生しました。
タイプ 'System.Data.SqlClient.SqlConnection' の値を 'System.Data.SqlClient.SqlConnection の 1 次元配列' に変換できません。
これはタラのソースです:
Imports System.Data.SqlClient
Public Class Form1
Dim connection As SqlConnection()
Dim reader As SqlDataReader
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
connection = New SqlConnection("data source=.; initial catalog=tp2_ado; integrated security = sspi")
Catch ex As Exception
MessageBox.Show(ex.Message())
End Try
End Sub
End Class