Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unknown database connector error 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 the datasource It comes up with an error:

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 let you know, I created that report by Crystal Reports 2008 Stand-alone IDE rather than generating it in VS2010 IDE and it is binded to that dataset dutring the crystal report wizard.

like image 579
Faulty Orc Avatar asked Apr 08 '11 14:04

Faulty Orc


1 Answers

What you need to do is that you will add an attribute to startup element in the following order:

 <startup useLegacyV2RuntimeActivationPolicy="true">        
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
like image 188
Faulty Orc Avatar answered Oct 04 '22 11:10

Faulty Orc