I'm having a major issue with an XSD dataset mapping thingy that I'm using within my current project. We are using XSDs for some data abstraction (it's quicker and debatably more maintainable that using Parameterised SQL or a StoredProc), and on my machine (running in the VS development environment) thy're working fine.
我在我当前项目中使用的XSD数据集映射问题存在一个主要问题。我们正在使用XSD进行一些数据抽象(使用参数化SQL或StoredProc更快,更容易维护),并且在我的机器上(在VS开发环境中运行),你的工作正常。
However, on the Pre-production server we use for our testing, the XSDs are not working correctly: some method calls will fail with the following error:
但是,在我们用于测试的预生产服务器上,XSD无法正常工作:某些方法调用将失败,并显示以下错误:
System.ArgumentException: Value does not fall within the expected range.
at Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value)
Has anyone ever encountered this issue before? The methods being called are simple select statements using 1-3 parameters, and as I said before they work fine on my machine.
有没有人曾经遇到过这个问题?被调用的方法是使用1-3个参数的简单选择语句,正如我之前所说,它们在我的机器上运行良好。
1 个解决方案
#1
1
We came across this issue too after converting our Data Sets (XSD's) from using System.Data.OracleClient to Oracle.DataAccess.Client.
在将我们的数据集(XSD)从使用System.Data.OracleClient转换为Oracle.DataAccess.Client之后,我们也遇到了这个问题。
The issue was that the Data Set designer was still using "Number" as the data type for the ProviderType. Oracle does not support the "Number" data type. We had to change the ProviderType in each of our Data Sets for each Table Adapter and each collection of Parameters for every query in the Table Adapter. We used "Decimal" for the ProviderType, and it seems to work fine. Don't forget to check the auto-generated "Select", "Update", and "Delete" queries too.
问题是数据集设计器仍然使用“Number”作为ProviderType的数据类型。 Oracle不支持“Number”数据类型。我们必须更改每个表适配器的每个数据集中的ProviderType以及表适配器中每个查询的每个参数集合。我们使用“Decimal”作为ProviderType,它似乎工作正常。不要忘记检查自动生成的“选择”,“更新”和“删除”查询。
Hopefully this will help someone.
希望这会对某人有所帮助。
#1
1
We came across this issue too after converting our Data Sets (XSD's) from using System.Data.OracleClient to Oracle.DataAccess.Client.
在将我们的数据集(XSD)从使用System.Data.OracleClient转换为Oracle.DataAccess.Client之后,我们也遇到了这个问题。
The issue was that the Data Set designer was still using "Number" as the data type for the ProviderType. Oracle does not support the "Number" data type. We had to change the ProviderType in each of our Data Sets for each Table Adapter and each collection of Parameters for every query in the Table Adapter. We used "Decimal" for the ProviderType, and it seems to work fine. Don't forget to check the auto-generated "Select", "Update", and "Delete" queries too.
问题是数据集设计器仍然使用“Number”作为ProviderType的数据类型。 Oracle不支持“Number”数据类型。我们必须更改每个表适配器的每个数据集中的ProviderType以及表适配器中每个查询的每个参数集合。我们使用“Decimal”作为ProviderType,它似乎工作正常。不要忘记检查自动生成的“选择”,“更新”和“删除”查询。
Hopefully this will help someone.
希望这会对某人有所帮助。