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:
未知的数据库连接器错误文件 C:DOCUME~1A_RAHN~1LOCALS~1Temp1Report {832105B2-2E31-4018-9761-77581CC86142}.rpt 中的错误:未知的数据库连接器错误
Unknown Database Connector Error Error in File C:DOCUME~1A_RAHN~1LOCALS~1Temp1Report {832105B2-2E31-4018-9761-77581CC86142}.rpt: Unknown Database Connector Error
为了让您知道,我通过 Crystal Reports 2008 独立 IDE 创建了该报表,而不是在 VS2010 IDE 中生成它,并且它通过水晶报表向导绑定到该数据集.
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.
推荐答案
您需要做的是,您将按以下顺序将属性添加到启动元素:
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>
这篇关于我的代码中出现未知数据库连接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我的代码中出现未知数据库连接器错误
基础教程推荐
- 将 XML 转换为通用列表 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- MS Visual Studio .NET 的替代品 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- SSE 浮点算术是否可重现? 2022-01-01