Error of unknown database connection in my code

Dim rp As New ReportDocument Dim myData As New MyDataSet Dim dt As New MyDataSet.UserDataTable Dim FirstRow As MyDataSet.UserRow = _ CType(myData.User.NewRow, MyDataSet.UserRow) FirstRow.MemberID = "1" FirstRow.FirstName = "Amir Hossein" FirstRow.LastName = "Rahnama" myData.User.Rows.Add(FirstRow) Dim SecondRow As MyDataSet.UserRow = _ CType(myData.User.NewRow, MyDataSet.UserRow) SecondRow.MemberID = "2" SecondRow.FirstName = "Aziz" SecondRow.LastName = "Khodaie" myData.User.Rows.Add(SecondRow) rp.Load("C:\Report.rpt") rp.SetDataSource(myData) CRV1.ReportSource = rp 

When setting up a data source, an error occurs:

Unknown database connector error Error in file C: \ DOCUME ~ 1 \ A_RAHN ~ 1 \ LOCALS ~ 1 \ Temp \ 1 \ Report {832105B2-2E31-4018-9761-77581CC86142} .rpt: Unknown database connector error

To report this, I created this report in the stand-alone IDE Crystal Reports 2008 instead of generating it in the ID2 VS2010, and is bound to this dataset, which uses the Crystal Report Wizard.

+6
source share
2 answers

What you need to do is that you add the attribute to the launch element in the following order:

  <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> 
+7
source

If this error occurs in Crystal Reports, you need to install a report on the crystal where this error occurs.

Then make the connection that you use during development, it will give the original error that is causing this error.

-1
source

Source: https://habr.com/ru/post/885515/


All Articles