数据提供者 [英] Data Provider

查看:79
本文介绍了数据提供者的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



您好


我正在开发VB.Net项目,我需要将数据提供程序从OLEDB更改为OracleClient。我也希望使用塑造我正在寻找相当于Provider = MSDataShape.1的使用OracleClient连接字符串时。提供程序语法适用于OLEDB连接字符串。有谁知道如何做到这一点?我正在使用1.1框架和Visual Studio vb.net

(注意......我切换到OracleClient因为我不能使用带有四位数年份掩码的SQL TO_DATE命令,如果TO_DATE嵌套在DECODE中。对于从1900年开始的任何年份,OLEDB提供商不断增加100年这种情况.OracleClient数据提供商在这方面测试得很好,没有这个问题。


谢谢


Paul Deibel。

解决方案

Paul,

由于DataSet的灵活性,你真的需要使用

MSDataShape对象吗?


DataSet允许你定义多个表,加上关系<这些表之间是
。这有效地为你做了塑造。


涵盖了这个以及关于ADO.NET的大量其他项目。我非常高兴建议

它作为ADO.NET的一个很好的教程&一旦你知道了一个很好的桌面参考

ADO.NET。


希望这有帮助

Jay

" Paul Deibel" <帕********* @ state.ma.us>在留言中写道

新闻:C2 ********************************** @ microsof t.com ...


您好:

我正在开发一个VB.Net项目,我需要更改数据提供者
OLEDB到OracleClient。我也希望使用塑造我是

寻找相当于Provider = MSDataShape.1的当使用

OracleClient连接字符串时。使用

OLEDB连接字符串时,提供程序语法可以正常工作。有谁知道如何做到这一点?我正在使用

1.1框架和Visual Studio vb.net。
(注意......我切换到OracleClient因为我无法使用带有四个的SQL TO_DATE
命令数字年份掩码,如果TO_DATE嵌套在

DECODE内.OLGB提供商在任何年份开始增加100年,并且在1900年这种情况下开始增加
.OracleClient数据提供商在这方面测试得很好

并且没有这个问题。)
谢谢,

Paul Deibel。



Jay,


感谢您的快速回复。该应用程序仅是查询,并且取决于用户正在查询的内容,结合来自下拉菜单的选择。 ...显示不同的列表/详细信息网格。这就是为什么我们不想要完整数据集的开销。 shape命令使我们能够灵活地根据用户感兴趣的内容动态创建SQL。它在OLEDB下运行良好;我很好奇是否可以使用OracleClient。它看起来不像。


PD


Paul,

考虑到这一点Shape提供程序是基于OLEDB的,而OracleClient是基于Oracle库的
。我不希望,也不试图让它工作。


你能让Shape提供者完全使用System.Data.OleDb吗?我希望你需要降价到ADODB才能获得形状提供者的全部好处。


Out好奇心,你在评论的基础上是什么?这就是为什么我们没有b $ b想要完整数据集的开销。上?某个地方是否有文档

表示DataSet的开销与
之间的实际差异与Shape Provider的开销有什么关系?或者你执行了CLR

Profiler&类似的测试?或者你只是猜测?我个人不知道并且真诚地想知道。

再次,我会使用DataSet,而不是打扰Shape提供者。作为

,DataSet提供了我知道Shape提供程序提供的所有内容,并且

当然DataSet完全是.NET友好的(我现在它完全可以工作)...直到

分析证明DataSet在这个应用程序中有不可接受的开销,我

不会寻找替代品。


制作之前一个决定我建议你阅读

DataSet& David Sceppa的书中对Shape Provider的评论

" Microsoft ADO.NET - Core Reference"来自MS Press。我发现Sceppa的书是

都是一个很好的教程和一个很好的桌面参考。


另外,如果你还没有,你可能想要在microsoft.public上征求ADO.NET

gurus的评论.dotnet.framework.adonet新闻组。


希望这有帮助

Jay


" Paul Deibel" <帕********* @ state.ma.us>在消息中写道

新闻:1A ********************************** @ microsof t.com ...

周杰伦,

感谢您的快速回复。该应用程序仅供查询,并且根据用户查询的内容取决于
,并结合下拉菜单中的选项

菜单。 ...显示不同的列表/详细信息网格。这就是为什么我们不想要完整数据集的开销。 shape命令为我们提供了灵活性

,可根据用户对b
看到的内容动态创建SQL。它在OLEDB下运行良好;我很好奇是否可以使用

OracleClient。它看起来不像。
P.D。




Hello

I am working on a VB.Net project where I need to change the data provider from OLEDB to OracleClient. I am also looking to use "shaping" and I am looking for the equivalent to "Provider=MSDataShape.1" when using an OracleClient connection string. The provider syntax works fine with an OLEDB Connection String. Does anyone know how to do this? I am using the 1.1 framework, and Visual Studio vb.net

(Note ... I switched to OracleClient because I cannot use a SQL TO_DATE command with a four digit year mask, if the TO_DATE is nested within a DECODE. The OLEDB provider keeps adding 100 years to any years beginning with 1900 with such a scenario. The OracleClient data provider tested well in this regard and does not have this problem.

Thanks

Paul Deibel.

解决方案

Paul,
With the flexibility of the DataSet do you really need to use the
MSDataShape object?

The DataSet allows you to define Multiple tables, plus the relationship
between those tables. Which effectively does the "shaping" for you.

David Sceppa''s book "Microsoft ADO.NET - Core Reference" from MS Press
covers this plus a plethora of other items about ADO.NET. I highly recommend
it as a good tutorial for ADO.NET & a good desk reference once you know
ADO.NET.

Hope this helps
Jay

"Paul Deibel" <Pa*********@state.ma.us> wrote in message
news:C2**********************************@microsof t.com...


Hello:

I am working on a VB.Net project where I need to change the data provider from OLEDB to OracleClient. I am also looking to use "shaping" and I am
looking for the equivalent to "Provider=MSDataShape.1" when using an
OracleClient connection string. The provider syntax works fine with an
OLEDB Connection String. Does anyone know how to do this? I am using the
1.1 framework, and Visual Studio vb.net.
(Note ... I switched to OracleClient because I cannot use a SQL TO_DATE command with a four digit year mask, if the TO_DATE is nested within a
DECODE. The OLEDB provider keeps adding 100 years to any years beginning
with 1900 with such a scenario. The OracleClient data provider tested well
in this regard and does not have this problem.)
Thanks,

Paul Deibel.



Jay,

Thanks for your quick reply. The application is query only, and depending upon what the user is querying, combined with a selection from a pull-down "menu" ... a different list/detail grid displays. That''s why we didn''t want the overhead of a full dataset. The shape command gives us the flexibility to dynamically create the SQL based upon what the user is interested in seeing. It works well under OLEDB; I''m very curious if it''s available with OracleClient. It doen''t look like it is.

P.D.


Paul,
Considering that the Shape provider is OLEDB based, and the OracleClient is
Oracle library based. I would not expect, nor try to get it to work.

Can you even get the Shape provider to FULLY work with System.Data.OleDb? I
would expect you would need to drop to the ADODB to get the full benefit of
the Shape Provider.

Out of curiosity, what are you basing your comment "That''s why we didn''t
want the overhead of a full dataset." on? Is there documentation someplace
that indicates what the actual difference between the overhead of a DataSet
is verses the overhead of the Shape Provider? Or did you perform CLR
Profiler & similar tests? Or are you simply surmising? I personally do not
know and sincerely would like to know.
Again, I would use the DataSet, and not bother with the Shape provider. As
the DataSet provides everything that I know the Shape provider provides, and
of course the DataSet is fully .NET friendly (I now it fully works)... Until
profiling proved that the DataSet had unacceptable overhead in this app, I
would not look for alternatives.

Before you make a decision I would recommend you read the chapter on the
DataSet & the comments on the Shape Provider in David Sceppa''s book
"Microsoft ADO.NET - Core Reference" from MS Press. I find Sceppa''s book to
be both a good tutorial & a good desk reference later.

Also, if you have not, you may want to solicit comments from the ADO.NET
gurus in the microsoft.public.dotnet.framework.adonet newsgroup.

Hope this helps
Jay

"Paul Deibel" <Pa*********@state.ma.us> wrote in message
news:1A**********************************@microsof t.com...

Jay,

Thanks for your quick reply. The application is query only, and depending upon what the user is querying, combined with a selection from a pull-down
"menu" ... a different list/detail grid displays. That''s why we didn''t want
the overhead of a full dataset. The shape command gives us the flexibility
to dynamically create the SQL based upon what the user is interested in
seeing. It works well under OLEDB; I''m very curious if it''s available with
OracleClient. It doen''t look like it is.
P.D.



这篇关于数据提供者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆