embed VB 코드에서 데이터베이스를 열려고합니다. MyConnection.Open()
에 내가 말하는 오류가SQL Reporting Services 임베디드 코드를 사용하여 데이터베이스에 액세스하려고 시도했습니다.
Warning 1 [rsRuntimeErrorInExpression] The Value expression for the textrun ‘Textbox1.Paragraphs[0].TextRuns[0]’ contains an error: Request for the permission of type 'System.Data.SqlClient.SqlClientPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. C:\Users\tedpottel\Documents\Visual Studio
보고서 내 데이터 소스가 Data Source=(local);Initial Catalog=bw
VB 코드는 다음과 같습니다
Public Function TestData () As Boolean
Dim MyConnection As System.Data.SQLClient.SqlConnection
Dim MyCommand As System.Data.SQLClient.SqlCommand
MyConnection = New System.Data.SQLClient.SqlConnection("server=(local);Initial Catalog=bw")
MyConnection.Open()
MyConnection.Close()
return True
End Function