VS2005中的类型化数据集 [英] Typed DataSets in VS2005

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

问题描述

大家好,


这篇文章与我之前关于DLL的

配置文件的帖子有点相关。

有没有人知道如何使用VS2005的新DataSet

设计器创建类型化数据集,但能够通过

配置配置连接字符串文件?设计者似乎将连接字符串硬编码到

数据集本身,这是不对的。


由VS2005创建的类型化数据集附带一个dll.config文件看起来好像是b $ b,好像它正在尝试做类似的事情,并且在编译时使用

可执行文件,但是改变那里的连接字符串

似乎没有任何效果。我们已经看到很多人问这个问题,但是还没有找到任何人接听它。

提前谢谢


Peter

解决方案

VSS 2005支持自动生成dataaccess图层..在这种情况下

你是可以自由更改硬编码连接字符串的代码,这样它就会从配置文件中读取它(显然你必须再次更改

代码)再次创建/编辑数据集。


在我的观点中,如果你是快速概念演示或工作的话,自动生成的代码是非常好的原型..但是如果你想要开发一个真正可扩展的大型系统,那么我宁愿

建议你拥有自己的数据访问层,的确可以从数据访问应用程序块或企业库获得一些

的帮助。

你会得到那个c有可能开发一个灵活的数据访问层..我用我的经验告诉你这个,如果你使用自动生成的代码

你有时会遇到瓶颈问题你的代码..


Nirosh。

" Peter Bradley" < pb ****** @ uwic.ac.ukwrote in message

news:eL ************** @ TK2MSFTNGP02.phx.gbl .. 。


大家好,


这篇文章与我之前关于
$ b的帖子有些相关用于DLL的$ b配置文件。


有没有人知道如何使用VS2005的新DataSet

设计器创建类型化数据集,但具有配置能力通过

配置文件连接字符串?设计者似乎将连接字符串硬编码为数据集本身的数据,这是不对的。


由VS2005创建的类型化数据集附带一个dll.config文件

看起来好像正在尝试做类似的事情,并且在编译时使用可执行文件放入

,但是改变

中的连接字符串似乎没有任何影响。我们已经看到很多人问这个问题,但是还没有找到任何人回答这个问题。


提前致谢



彼得



谢谢Nirosh,但我不确定我理解了这一切。


我只是在谈论一个打字的数据集:不是关于整个数据访问

层 - 我们自己编码和哪些使用许多类型化的数据集。到目前为止,情况至少是
。如果键入的数据集现在具有硬编码的

连接字符串,我们肯定不再使用它们

- 出于安全原因,除了其他任何东西。< br $> b $ b彼得


" Champika Nirosh" < te ** @ tc.com写信息

新闻:eL ************** @ TK2MSFTNGP04.phx.gbl ...
< blockquote class =post_quotes>
VSS 2005支持自动生成dataaccess图层..在这种情况下

你可以自由更改硬编码连接字符串的代码所以

它将从配置文件中读取它(显然,如果必须再次创建/编辑数据集,则必须再次更改

代码。


在我看来,如果你是快速概念演示或工作原型,那么自动生成的代码是非常好的。但如果你是
是希望开发一个真正可扩展的大型系统,然后我宁愿建议你拥有自己的数据访问层,确实你可以从数据访问中获得一些

的帮助应用程序块或企业库。

您将有机会开发灵活的数据访问层..

我用m告诉它经验,如果你使用自动生成的

代码,你有时会进入你的代码的瓶颈..


Nirosh。


" Peter Bradley" < pb ****** @ uwic.ac.ukwrote in message

news:eL ************** @ TK2MSFTNGP02.phx.gbl .. 。


>大家好,

这篇文章与我早期关于DLL的配置文件的帖子有些相关。

是否有人知道如何使用VS2005的新DataSet设计器创建类型化数据集,但是能否通过配置文件配置连接字符串?设计人员似乎将连接字符串硬编码到数据集本身,这是不对的。

由VS2005创建的类型化数据集附带一个dll.config文件,
好像它正在尝试做类似的事情,并且在编译时将其与可执行文件放在一起,但改变连接字符串
在那里似乎没有有任何影响。我们见过很多人提出这个问题,但还没有人找到答案。

提前致谢


Peter




你的意思是说只需通过VSS IDE创建一个类型化的DataSet

连接字符串??


我在这里错过了一些东西.. ??谁能在这里帮助我.. ??


Nirosh。


" Peter Bradley" < pb ****** @ uwic.ac.ukwrote in message

news:uH ************** @ TK2MSFTNGP02.phx.gbl .. 。


谢谢Nirosh,但我不确定我是否理解这一切。


我只会说话关于一个类型化的DataSet:不是关于整个数据访问

层 - 我们自己编码并使用许多类型化数据集。到目前为止,情况至少是
。如果键入的数据集现在具有硬编码的

连接字符串,我们肯定不再使用它们

- 出于安全原因,除了其他任何东西。< br $> b
$ b彼得


" Champika Nirosh" < te ** @ tc.com写信息

新闻:eL ************** @ TK2MSFTNGP04.phx.gbl ...
< blockquote class =post_quotes>
> VSS 2005支持自动生成dataaccess图层..在这种情况下,您可以自由更改硬编码连接字符串的代码
以便它将从配置文件中读取它(显然,如果必须再次创建/编辑数据集,则必须再次更改代码。

在我看来,自动生成的代码非常如果您正在寻求快速概念演示或工作原型,那就太好了......但如果您正在寻求开发真正可扩展的大型系统,那么我建议您拥有您自己的数据访问层,实际上您可能有来自数据访问应用程序块或企业库的一些帮助。您将有机会开发灵活的数据访问层。我是用我的经验告诉这个,如果你用自动生成的c去颂歌,你有时会进入你的代码的瓶颈......

Nirosh。

" Peter Bradley" < pb ****** @ uwic.ac.ukwrote in message
新闻:eL ************** @ TK2MSFTNGP02.phx.gbl ...


>>大家好,

这篇文章与我之前关于DLL的配置文件的帖子相关。

有没有人知道如何使用VS2005的新DataSet设计器创建类型化数据集,但能否通过配置文件配置连接字符串?设计人员似乎将连接字符串硬编码到数据集本身,这是不对的。

由VS2005创建的类型化数据集附带一个dll.config文件,
好像它正在尝试做类似的事情,并且在编译时将其与可执行文件放在一起,但改变连接字符串
在那里似乎没有有任何影响。我们见过很多人提出这个问题,但还没有人找到答案。

提前致谢


彼得





Hi all,

This post is sort of tangentially related to my earlier posts on
configuration files for DLLs.

Does anyone know how to create typed DataSets using VS2005''s new DataSet
designer, but with the ability to configure the connection string via a
config file? The designer seems to hard-code the connection string into the
dataset itself, which just can''t be right.

The typed DataSets created by VS2005 comes with a dll.config file that looks
as though it''s trying to do something like that, and which is put with the
executable at compile time, but altering the connection string in there
doesn''t appear to have any effect. We''ve seen lots of people asking this
question, but haven''t found anyone answering it yet.
Thanks in advance

Peter

解决方案

VSS 2005 support auto generating the dataaccess layer .. and in that case
you are free to change the code where it hardcode the connection string so
that it will read it from a config file (obviously you have to change the
code again if you have to create/ edit the dataset again.

In my view point the automatically generated code is very good if you are
heading toward a quick concept demo or a working prototype.. but if you are
looking to develop a real extensible large-scale system, then I rather
advice you to have your own data access layer, indeed you may have some
assistance from the Data access Applcation Blocks or enterprise library.
There you will get that chance of developing a flexible dataaccess layer.. I
am telling this with my experience and if you go with the auto geneated code
you will at times drive in to bottleneck of your code..

Nirosh.
"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...

Hi all,

This post is sort of tangentially related to my earlier posts on
configuration files for DLLs.

Does anyone know how to create typed DataSets using VS2005''s new DataSet
designer, but with the ability to configure the connection string via a
config file? The designer seems to hard-code the connection string into
the dataset itself, which just can''t be right.

The typed DataSets created by VS2005 comes with a dll.config file that
looks as though it''s trying to do something like that, and which is put
with the executable at compile time, but altering the connection string in
there doesn''t appear to have any effect. We''ve seen lots of people asking
this question, but haven''t found anyone answering it yet.
Thanks in advance

Peter



Thanks Nirosh, but I''m not sure I understood all that.

I''m only talking about a typed DataSet: not about the entire data access
layer - which we code ourselves and which uses many typed datasets. At
least that was the case until now. If typed datasets now have the
connection string hard coded into them, we''ll definitely not be using them
any more - for security reasons apart from anything else.
Peter

"Champika Nirosh" <te**@tc.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...

VSS 2005 support auto generating the dataaccess layer .. and in that case
you are free to change the code where it hardcode the connection string so
that it will read it from a config file (obviously you have to change the
code again if you have to create/ edit the dataset again.

In my view point the automatically generated code is very good if you are
heading toward a quick concept demo or a working prototype.. but if you
are looking to develop a real extensible large-scale system, then I rather
advice you to have your own data access layer, indeed you may have some
assistance from the Data access Applcation Blocks or enterprise library.
There you will get that chance of developing a flexible dataaccess layer..
I am telling this with my experience and if you go with the auto geneated
code you will at times drive in to bottleneck of your code..

Nirosh.
"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...

>Hi all,

This post is sort of tangentially related to my earlier posts on
configuration files for DLLs.

Does anyone know how to create typed DataSets using VS2005''s new DataSet
designer, but with the ability to configure the connection string via a
config file? The designer seems to hard-code the connection string into
the dataset itself, which just can''t be right.

The typed DataSets created by VS2005 comes with a dll.config file that
looks as though it''s trying to do something like that, and which is put
with the executable at compile time, but altering the connection string
in there doesn''t appear to have any effect. We''ve seen lots of people
asking this question, but haven''t found anyone answering it yet.
Thanks in advance

Peter




You mean to say that just creating a typed DataSet via VSS IDE add the
connection string to it??

Am I missing some thing here.. ?? can anyone else assist me here..??

Nirosh.

"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:uH**************@TK2MSFTNGP02.phx.gbl...

Thanks Nirosh, but I''m not sure I understood all that.

I''m only talking about a typed DataSet: not about the entire data access
layer - which we code ourselves and which uses many typed datasets. At
least that was the case until now. If typed datasets now have the
connection string hard coded into them, we''ll definitely not be using them
any more - for security reasons apart from anything else.
Peter

"Champika Nirosh" <te**@tc.comwrote in message
news:eL**************@TK2MSFTNGP04.phx.gbl...

>VSS 2005 support auto generating the dataaccess layer .. and in that case
you are free to change the code where it hardcode the connection string
so that it will read it from a config file (obviously you have to change
the code again if you have to create/ edit the dataset again.

In my view point the automatically generated code is very good if you are
heading toward a quick concept demo or a working prototype.. but if you
are looking to develop a real extensible large-scale system, then I
rather advice you to have your own data access layer, indeed you may have
some assistance from the Data access Applcation Blocks or enterprise
library. There you will get that chance of developing a flexible
dataaccess layer.. I am telling this with my experience and if you go
with the auto geneated code you will at times drive in to bottleneck of
your code..

Nirosh.
"Peter Bradley" <pb******@uwic.ac.ukwrote in message
news:eL**************@TK2MSFTNGP02.phx.gbl...

>>Hi all,

This post is sort of tangentially related to my earlier posts on
configuration files for DLLs.

Does anyone know how to create typed DataSets using VS2005''s new DataSet
designer, but with the ability to configure the connection string via a
config file? The designer seems to hard-code the connection string into
the dataset itself, which just can''t be right.

The typed DataSets created by VS2005 comes with a dll.config file that
looks as though it''s trying to do something like that, and which is put
with the executable at compile time, but altering the connection string
in there doesn''t appear to have any effect. We''ve seen lots of people
asking this question, but haven''t found anyone answering it yet.
Thanks in advance

Peter





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

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