473,738 Members | 4,774 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Typed DataSets in VS2005

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
Mar 29 '07 #1
21 2427
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******** ******@TK2MSFTN GP02.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


Mar 29 '07 #2
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.comwro te in message
news:eL******** ******@TK2MSFTN GP04.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******** ******@TK2MSFTN GP02.phx.gbl...
>Hi all,

This post is sort of tangentially related to my earlier posts on
configuratio n 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



Mar 29 '07 #3
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******** ******@TK2MSFTN GP02.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.comwro te in message
news:eL******** ******@TK2MSFTN GP04.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******* *******@TK2MSFT NGP02.phx.gbl.. .
>>Hi all,

This post is sort of tangentially related to my earlier posts on
configurati on 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




Mar 29 '07 #4
Yes. That appears to be the case. There's tons (UK) of talk about it if
you google for it e.g.

http://www.theserverside.net/discuss...hread_id=37108

(scroll down to "Connection string pangs")
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:eg******** ******@TK2MSFTN GP06.phx.gbl...
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******** ******@TK2MSFTN GP02.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.comwro te in message
news:eL******* *******@TK2MSFT NGP04.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****** ********@TK2MSF TNGP02.phx.gbl. ..
Hi all,

This post is sort of tangentially related to my earlier posts on
configuratio n 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




Mar 29 '07 #5
I am pretty sure that you are doing some thing wrong here.. can you just
create a seperate type dataset and confirm that it add a connection string
too?? Why it need to have a connection string hradcoded to create a typed
dataset for you.. but it you select the optipon of autocreating the DAL then
yes it does add a hardcoded connection string to the dataset..

Nirosh.

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:uH******** ******@TK2MSFTN GP02.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.comwro te in message
news:eL******** ******@TK2MSFTN GP04.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******* *******@TK2MSFT NGP02.phx.gbl.. .
>>Hi all,

This post is sort of tangentially related to my earlier posts on
configurati on 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




Mar 29 '07 #6
Nirosh. That's what we've done. That's why I'm asking the question.
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:ub******** ******@TK2MSFTN GP02.phx.gbl...
>I am pretty sure that you are doing some thing wrong here.. can you just
create a seperate type dataset and confirm that it add a connection string
too?? Why it need to have a connection string hradcoded to create a typed
dataset for you.. but it you select the optipon of autocreating the DAL
then yes it does add a hardcoded connection string to the dataset..

Nirosh.

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:uH******** ******@TK2MSFTN GP02.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.comwro te in message
news:eL******* *******@TK2MSFT NGP04.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****** ********@TK2MSF TNGP02.phx.gbl. ..
Hi all,

This post is sort of tangentially related to my earlier posts on
configuratio n 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




Mar 29 '07 #7
Oh yeas that is just to synchup wth the database.. ok I understand you now

cann't you delete it after you create the type dataset..

I am sorry to take you this far without understanding the problem..

Let me check it and let you know result

Nirosh.

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Yes. That appears to be the case. There's tons (UK) of talk about it if
you google for it e.g.

http://www.theserverside.net/discuss...hread_id=37108

(scroll down to "Connection string pangs")
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:eg******** ******@TK2MSFTN GP06.phx.gbl...
>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******* *******@TK2MSFT NGP02.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.comwro te in message
news:eL****** ********@TK2MSF TNGP04.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***** *********@TK2MS FTNGP02.phx.gbl ...
Hi all,
>
This post is sort of tangentially related to my earlier posts on
configurati on 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
connectio n 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
>
>




Mar 29 '07 #8
Just in case anyone else has any doubts, here's the generated xsd file
(slightly anonymised):

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ItregMailDe tailsTypedDataS et"
targetNamespace ="http://tempuri.org/ItregMailDetail sTypedDataSet.x sd"
xmlns:mstns="ht tp://tempuri.org/ItregMailDetail sTypedDataSet.x sd"
xmlns="http://tempuri.org/ItregMailDetail sTypedDataSet.x sd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="u rn:schemas-microsoft-com:xml-msdata"
xmlns:msprop="u rn:schemas-microsoft-com:xml-msprop"
attributeFormDe fault="qualifie d" elementFormDefa ult="qualified" >
<xs:annotatio n>
<xs:appinfo source="urn:sch emas-microsoft-com:xml-msdatasource">
<DataSource DefaultConnecti onIndex="0"
FunctionsCompon entName="Querie sTableAdapter" Modifier="AutoL ayout,
AnsiClass, Class, Public" SchemaSerializa tionMode="Inclu deSchema"
xmlns="urn:sche mas-microsoft-com:xml-msdatasource">
<Connections>
<Connection AppSettingsObje ctName="Setting s"
AppSettingsProp ertyName="aserv ernamedevConnec tionString"
ConnectionStrin gObject="" IsAppSettingsPr operty="True" Modifier="Assem bly"
Name="aserverna medevConnection String (Settings)" ParameterPrefix ="@"
PropertyReferen ce="Application Settings.ItregM ailDetailsTyped DataSet.Propert ies.Settings.Gl obalReference.D efault.aservern amedevConnectio nString"
Provider="Syste m.Data.SqlClien t">
</Connection>
</Connections>
<Tables>
<TableAdapter BaseClass="Syst em.ComponentMod el.Component"
DataAccessorMod ifier="AutoLayo ut, AnsiClass, Class, Public"
DataAccessorNam e="atablenameTa bleAdapter"
GeneratorDataCo mponentClassNam e="atablenameTa bleAdapter" Name="atablenam e"
UserDataCompone ntName="atablen ameTableAdapter ">
<MainSource>
<DbSource ConnectionRef=" aservernamedevC onnectionString
(Settings)" DbObjectName="a servernamedev.d bo.atablename"
DbObjectType="T able" FillMethodModif ier="Public" FillMethodName= "Fill"
GenerateMethods ="Both" GenerateShortCo mmands="True"
GeneratorGetMet hodName="GetDat a" GeneratorSource Name="Fill"
GetMethodModifi er="Public" GetMethodName=" GetData" QueryType="Rows et"
ScalarCallRetva l="System.Objec t, mscorlib, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9" UseOptimisticCo ncurrency="True "
UserGetMethodNa me="GetData" UserSourceName= "Fill">
<DeleteComman d>
<DbCommand CommandType="Te xt" ModifiedByUser= "False">
<CommandText>DE LETE FROM [dbo].[atablename] WHERE
(([mailbox] = @Original_mailb ox) AND ([storage_group] =
@Original_stora ge_group) AND ([server] = @Original_serve r))</CommandText>
<Parameters>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_mailb ox" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="m ailbox" SourceColumnNul lMapping="False "
SourceVersion=" Original">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_stora ge_group" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s torage_group"
SourceColumnNul lMapping="False " SourceVersion=" Original">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_serve r" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s erver" SourceColumnNul lMapping="False "
SourceVersion=" Original">
</Parameter>
</Parameters>
</DbCommand>
</DeleteCommand>
<InsertComman d>
<DbCommand CommandType="Te xt" ModifiedByUser= "False">
<CommandText>IN SERT INTO [dbo].[atablename] ([mailbox],
[storage_group], [server]) VALUES (@mailbox, @storage_group, @server);
SELECT mailbox, storage_group, server FROM atablename WHERE (mailbox =
@mailbox)</CommandText>
<Parameters>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @mailbox" Precision="0" ProviderType="V arChar" Scale="0"
Size="0" SourceColumn="m ailbox" SourceColumnNul lMapping="False "
SourceVersion=" Current">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @storage_group" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s torage_group"
SourceColumnNul lMapping="False " SourceVersion=" Current">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @server" Precision="0" ProviderType="V arChar" Scale="0"
Size="0" SourceColumn="s erver" SourceColumnNul lMapping="False "
SourceVersion=" Current">
</Parameter>
</Parameters>
</DbCommand>
</InsertCommand>
<SelectComman d>
<DbCommand CommandType="Te xt" ModifiedByUser= "False">
<CommandText>SE LECT mailbox, storage_group, server FROM
dbo.atablename</CommandText>
<Parameters>
</Parameters>
</DbCommand>
</SelectCommand>
<UpdateComman d>
<DbCommand CommandType="Te xt" ModifiedByUser= "False">
<CommandText>UP DATE [dbo].[atablename] SET [mailbox] =
@mailbox, [storage_group] = @storage_group, [server] = @server WHERE
(([mailbox] = @Original_mailb ox) AND ([storage_group] =
@Original_stora ge_group) AND ([server] = @Original_serve r));
SELECT mailbox, storage_group, server FROM atablename WHERE (mailbox =
@mailbox)</CommandText>
<Parameters>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @mailbox" Precision="0" ProviderType="V arChar" Scale="0"
Size="0" SourceColumn="m ailbox" SourceColumnNul lMapping="False "
SourceVersion=" Current">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @storage_group" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s torage_group"
SourceColumnNul lMapping="False " SourceVersion=" Current">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @server" Precision="0" ProviderType="V arChar" Scale="0"
Size="0" SourceColumn="s erver" SourceColumnNul lMapping="False "
SourceVersion=" Current">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_mailb ox" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="m ailbox" SourceColumnNul lMapping="False "
SourceVersion=" Original">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_stora ge_group" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s torage_group"
SourceColumnNul lMapping="False " SourceVersion=" Original">
</Parameter>
<Parameter AllowDbNull="Fa lse" AutogeneratedNa me=""
DataSourceName= "" DbType="AnsiStr ing" Direction="Inpu t"
ParameterName=" @Original_serve r" Precision="0" ProviderType="V arChar"
Scale="0" Size="0" SourceColumn="s erver" SourceColumnNul lMapping="False "
SourceVersion=" Original">
</Parameter>
</Parameters>
</DbCommand>
</UpdateCommand>
</DbSource>
</MainSource>
<Mappings>
<Mapping SourceColumn="m ailbox" DataSetColumn=" mailbox" />
<Mapping SourceColumn="s torage_group"
DataSetColumn=" storage_group" />
<Mapping SourceColumn="s erver" DataSetColumn=" server" />
</Mappings>
<Sources>
<DbSource ConnectionRef=" aservernamedevC onnectionString
(Settings)" DbObjectName="a servernamedev.d bo.usp_itreg_ro undrobin"
DbObjectType="S toredProcedure" FillMethodModif ier="Public"
FillMethodName= "FillBy" GenerateMethods ="Both" GenerateShortCo mmands="True"
GeneratorGetMet hodName="GetDat aBy" GeneratorSource Name="FillBy"
GetMethodModifi er="Public" GetMethodName=" GetDataBy" QueryType="Rows et"
ScalarCallRetva l="System.Objec t, mscorlib, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9" UseOptimisticCo ncurrency="True "
UserGetMethodNa me="GetDataBy" UserSourceName= "FillBy">
<SelectComman d>
<DbCommand CommandType="St oredProcedure"
ModifiedByUser= "False">
<CommandText>db o.usp_itreg_rou ndrobin</CommandText>
<Parameters>
<Parameter AllowDbNull="Tr ue" AutogeneratedNa me=""
DataSourceName= "" DbType="Int32" Direction="Retu rnValue"
ParameterName=" @RETURN_VALUE" Precision="10" ProviderType="I nt" Scale="0"
Size="4" SourceColumnNul lMapping="False " SourceVersion=" Current">
</Parameter>
</Parameters>
</DbCommand>
</SelectCommand>
</DbSource>
</Sources>
</TableAdapter>
</Tables>
<Sources>
</Sources>
</DataSource>
</xs:appinfo>
</xs:annotation>
<xs:element name="ItregMail DetailsTypedDat aSet" msdata:IsDataSe t="true"
msdata:UseCurre ntLocale="true"
msprop:Generato r_UserDSName="I tregMailDetails TypedDataSet"
msprop:Generato r_DataSetName=" ItregMailDetail sTypedDataSet">
<xs:complexType >
<xs:choice minOccurs="0" maxOccurs="unbo unded">
<xs:element name="atablenam e"
msprop:Generato r_UserTableName ="atablename "
msprop:Generato r_RowDeletedNam e="atablenameRo wDeleted"
msprop:Generato r_RowChangedNam e="atablenameRo wChanged"
msprop:Generato r_RowClassName= "atablename Row"
msprop:Generato r_RowChangingNa me="atablenameR owChanging"
msprop:Generato r_RowEvArgName= "atablenameRowC hangeEvent"
msprop:Generato r_RowEvHandlerN ame="atablename RowChangeEventH andler"
msprop:Generato r_TableClassNam e="atablenameDa taTable"
msprop:Generato r_TableVarName= "tableatablenam e"
msprop:Generato r_RowDeletingNa me="atablenameR owDeleting"
msprop:Generato r_TablePropName ="atablename ">
<xs:complexType >
<xs:sequence>
<xs:element name="mailbox"
msprop:Generato r_UserColumnNam e="mailbox"
msprop:Generato r_ColumnVarName InTable="column mailbox"
msprop:Generato r_ColumnPropNam eInRow="mailbox "
msprop:Generato r_ColumnPropNam eInTable="mailb oxColumn">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="storage_g roup"
msprop:Generato r_UserColumnNam e="storage_grou p"
msprop:Generato r_ColumnVarName InTable="column storage_group"
msprop:Generato r_ColumnPropNam eInRow="storage _group"
msprop:Generato r_ColumnPropNam eInTable="stora ge_groupColumn" >
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:maxLength value="10" />
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="server"
msprop:Generato r_UserColumnNam e="server"
msprop:Generato r_ColumnVarName InTable="column server"
msprop:Generato r_ColumnPropNam eInRow="server"
msprop:Generato r_ColumnPropNam eInTable="serve rColumn">
<xs:simpleTyp e>
<xs:restricti on base="xs:string ">
<xs:maxLength value="15" />
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
<xs:unique name="Constrain t1">
<xs:selector xpath=".//mstns:atablenam e" />
<xs:field xpath="mstns:ma ilbox" />
</xs:unique>
</xs:element>
</xs:schema>

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:eP******** ******@TK2MSFTN GP02.phx.gbl...
Nirosh. That's what we've done. That's why I'm asking the question.
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:ub******** ******@TK2MSFTN GP02.phx.gbl...
>>I am pretty sure that you are doing some thing wrong here.. can you just
create a seperate type dataset and confirm that it add a connection string
too?? Why it need to have a connection string hradcoded to create a typed
dataset for you.. but it you select the optipon of autocreating the DAL
then yes it does add a hardcoded connection string to the dataset..

Nirosh.

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:uH******* *******@TK2MSFT NGP02.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.comwro te in message
news:eL****** ********@TK2MSF TNGP04.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***** *********@TK2MS FTNGP02.phx.gbl ...
Hi all,
>
This post is sort of tangentially related to my earlier posts on
configurati on 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
connectio n 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
>
>




Mar 29 '07 #9
Thanks, Nirosh.

You might like to look at the .xsd file I've posted lower down in this
thread.
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:e2******** ******@TK2MSFTN GP05.phx.gbl...
Oh yeas that is just to synchup wth the database.. ok I understand you now

cann't you delete it after you create the type dataset..

I am sorry to take you this far without understanding the problem..

Let me check it and let you know result

Nirosh.

"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
>Yes. That appears to be the case. There's tons (UK) of talk about it if
you google for it e.g.

http://www.theserverside.net/discuss...hread_id=37108

(scroll down to "Connection string pangs")
Peter

"Champika Nirosh" <te**@tc.comwro te in message
news:eg******* *******@TK2MSFT NGP06.phx.gbl.. .
>>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****** ********@TK2MSF TNGP02.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.comwro te in message
news:eL***** *********@TK2MS FTNGP04.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
enterpris e 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
bottlenec k of your code..
>
Nirosh.
>
>
"Peter Bradley" <pb******@uwic. ac.ukwrote in message
news:eL**** **********@TK2M SFTNGP02.phx.gb l...
>Hi all,
>>
>This post is sort of tangentially related to my earlier posts on
>configurat ion 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
>connecti on 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
>connecti on string in there doesn't appear to have any effect. We've
>seen lots of people asking this question, but haven't found anyone
>answerin g it yet.
>>
>>
>Thanks in advance
>>
>>
>>
>>
>>
>Peter
>>
>>
>
>




Mar 29 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1627
by: alex | last post by:
OK, so you are using ndoc to make some nice documentation for your C# class library. What the hell are you going to do with your typed datasets? When you compile you get 100s of warnings and you aren't going to exactly document all that - even if you do it will get lost when you change your dataset. The only two options in vs2005 that I have found are:
4
9920
by: Ronald S. Cook | last post by:
I've always used untyped datasets. In a Microsoft course, it walks through creating typed datasets and harps on the benefits. It has you drag all these things around ..wizard, wizard, wizard... code gen, code gen, code gen. What's at the end looks slick, but then there's a ton of generated code that I'm going to have to maintain now. I.e. I like typing things myself (don't like wizards) so I can know exactly what I've done.
13
4655
by: Rotsey | last post by:
Hi, I have created a typed dataset (xsd file) with 2 tables and a relation between them in VS2005. How I do I now bind that dataset to a Gridview?? When i do this the page is blank.
0
1110
by: DC | last post by:
Hi, I am about (to be forced) to implement a number of webcontrols that display data from various xml sources. The data is to be loaded on the fly, some data is to be cached. The data will primarily be delivered from two providers and is quiet plain, e.g. <row>
0
1054
by: Ben | last post by:
I'm trying to apply techniques I'd normally use to pull data from SQL/Server to pull XML from SQL/Server, and I'm running into a problem. Here's what I'm doing: 1. I've built a stored procedure that pulls my data, and renders it into proper XML. I'm using 'FOR XML AUTO, ELEMENTS', but I'll bet the issues would occur with EXPLICIT also. 2. Using VS2005, I've added a DataSet item, and have dragged the sProc into the dataset so I can...
12
3601
by: BillE | last post by:
I'm trying to decide if it is better to use typed datasets or business objects, so I would appreciate any thoughts from someone with more experience. When I use a business object to populate a gridview, for example, I loop through a datareader, populating an array list with instances of a custom class in the middle tier, and then send the array list up to the presentation layer and bind the gridview to it. If I use a typed dataset, I...
0
8969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8788
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9263
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9208
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8210
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6751
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3279
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2193
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.