SQL Server的数据访问层& MS Access [英] Data access layer for SQL Server & MS Access

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

问题描述




我有一个Web应用程序,需要能够使用SQL Server或MS

Access - 具体取决于安装。我想避免使用

无限量的代码(例如:dim x as sqlDataReader,dim y as

OLEDBDatareader应用程序的很多部分)


我能不能避免这种情况并将OLEDB用于两种数据库类型吗?


什么是最佳方式 - OLEDB或创建某种数据访问层

返回记录集。


谢谢

Mike

解决方案
是。 (您可以将OLEDB用于两种数据库类型。)


Robin S.

---------------- -

< sa ********************* @ yahoo.comwrote in message

新闻: 11*********************@f1g2000cwa.googlegrou ps.com ...


Hi


我有一个需要能够使用SQL Server或MS的Web应用程序

Access - 取决于安装。我想避免使用

无限量的代码(例如:dim x as sqlDataReader,dim y as

OLEDBDatareader应用程序的很多部分)


我能不能避免这种情况并将OLEDB用于两种数据库类型吗?


什么是最佳方式 - OLEDB或创建某种数据访问层

返回记录集。


谢谢

Mike



好的,谢谢。

RobinS写道:


是的。 (您可以将OLEDB用于两种数据库类型。)


Robin S.

---------------- -

< sa ********************* @ yahoo.comwrote in message

新闻: 11*********************@f1g2000cwa.googlegrou ps.com ...


Hi


我有一个需要能够使用SQL Server或MS的Web应用程序

Access - 取决于安装。我想避免使用

无限量的代码(例如:dim x as sqlDataReader,dim y as

OLEDBDatareader应用程序的很多部分)


我能不能避免这种情况并将OLEDB用于两种数据库类型吗?


什么是最佳方式 - OLEDB或创建某种数据访问层

返回记录集。


谢谢

Mike


不要听这个人,他只是在这些群体周围发布消息

试图引发麻烦并给人们错误的信息。


你需要创建一个自定义的数据访问类这会掩盖您要连接的数据库类型

。 OLEDB速度太慢(比原生SQL Server连接速度慢100美元)。


老实说.net数据工具的局限性( IE:没有

通用数据读取器等) - 你可能更好地保持生活简单。

我不是故意亵渎神明但只是导入ADO(COM)和使用它 -

至少它有MoveNext。


大师

" Visual Basic 6.0 Jihad" sa ************* ********@yahoo.com 写道:





我有一个需要能够使用SQL Server或MS的Web应用程序

Access - 取决于安装。我想避免使用

无限量的代码(例如:dim x as sqlDataReader,dim y as

OLEDBDatareader应用程序的很多部分)


我能不能避免这种情况并将OLEDB用于两种数据库类型吗?


什么是最佳方式 - OLEDB或创建某种数据访问层

返回记录集。


谢谢

Mike


Hi

I have a web app that needs to be able to use either SQL Server or MS
Access - depending upon the installation. I want to avoid having
unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
OLEDBDatareader in lots of parts of the app)

Could I not just avoid this and use OLEDB for both database types?

Whats the best way - OLEDB or to create some kind of data access layer
that returns recordsets.

Thanks
Mike

解决方案

Yes. (You can use OLEDB for both database types.)

Robin S.
------------------
<sa*********************@yahoo.comwrote in message
news:11*********************@f1g2000cwa.googlegrou ps.com...

Hi

I have a web app that needs to be able to use either SQL Server or MS
Access - depending upon the installation. I want to avoid having
unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
OLEDBDatareader in lots of parts of the app)

Could I not just avoid this and use OLEDB for both database types?

Whats the best way - OLEDB or to create some kind of data access layer
that returns recordsets.

Thanks
Mike



OK, thanks for that.
RobinS wrote:

Yes. (You can use OLEDB for both database types.)

Robin S.
------------------
<sa*********************@yahoo.comwrote in message
news:11*********************@f1g2000cwa.googlegrou ps.com...

Hi

I have a web app that needs to be able to use either SQL Server or MS
Access - depending upon the installation. I want to avoid having
unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
OLEDBDatareader in lots of parts of the app)

Could I not just avoid this and use OLEDB for both database types?

Whats the best way - OLEDB or to create some kind of data access layer
that returns recordsets.

Thanks
Mike


Dont listen to this guy, he just posts messages around these groups
trying to cause trouble and give people the wrong information.

You need to create a custom "Data Access Class" that obscures the type
of database that you are connecting to. OLEDB is way too slow (100
times slower than a native SQL Server connection).

To be honest with the limitations of the .net data tools (IE: no
generic dataReader etc) - you are probably better to keep life simple.
I don''t mean to be blasphemous but just import ADO (COM) and use that -
at least it has MoveNext.

The Grand Master
"Visual Basic 6.0 Jihad"
sa*********************@yahoo.com wrote:

Hi

I have a web app that needs to be able to use either SQL Server or MS
Access - depending upon the installation. I want to avoid having
unnessesary amounts of code (eg: dim x as sqlDataReader, dim y as
OLEDBDatareader in lots of parts of the app)

Could I not just avoid this and use OLEDB for both database types?

Whats the best way - OLEDB or to create some kind of data access layer
that returns recordsets.

Thanks
Mike


这篇关于SQL Server的数据访问层&amp; MS Access的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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