Re: Why force a connection string scope to be application?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




"Göran Andersson" <guffa@xxxxxxxxx> wrote in message
news:uwkNA%231lGHA.1552@xxxxxxxxxxxxxxxxxxxxxxx
Steven Bolard wrote:
What is it that you are using that forces connection strings to be
application scoped read-only?

Visual Studio 2005.

Funny, that's what I'm using too. There is absolutely nothing in Visual
Studio that forces connection strings to be application scoped and
read-only.

Great then please tell me me how when using My Project > Settings designer,
I can create an application setting of type connection string that is not
forced-scoped to application.


If you put something in the settings for the application, it will of
course have application scope. I don't see how this could come as a
surprise to you.

This is incorrect. They can also be scoped to user type using precisely the
same tool.

Put the connection strings elsewhere and you can have a different scope.

In other words dont use the tool provided for configuration settings? It
still doesn't answer the question of the thread. Why do i have too?
What is Microsofts reasoning and logic behind this? I dont know how else to
say it? I already do it another way. I want to know why Microsoft does it
the way they do it.

I thought it would be a very simple question if not to answer then at least
understand. Take me and my code right out of the equation altogether and let
me repeat.
Why force a connection string to be scoped application? Is there anything
for me to learn here or is it just like that for no particular reason at
all.

There is not neccessarily a sound answer to this question, Microsoft are not
immune to doing stupid or unneccessarily restricitve things.
However after reading a handful of articles on MSDN about the new 2.0
features etc, about the powerful VS2005 support for the configuration
settings, ease of use etc etc,
it was a little disappointing to hit a snag on the first use of tool.
Especially on something so basic.


In this case the gate is exactly as wide as the pool. If you can't get
through the gate, you can't get in the pool. There are hundreds of other
pools that you can use instead.

Thanks. This was understood before my first post. I just wanted to know why
the gate is exactly and only as wide as the pool.


I just pictured the wheelchair guy in "Little Brittain", insisting on
using this particluar pool, and when they rebuilt it so that it's
possible, he says:

"I can't swim".

Yes i've seen that episode. Perhaps the answer to my question can be drawn
from a certain helpful travel agent

Why not? Because "computer says no!"

Steve








"Kevin Spencer" <uce@xxxxxxx> wrote in message
news:OtFN59UlGHA.4212@xxxxxxxxxxxxxxxxxxxxxxx
Sure i can edit VS generated code but can anyone tell me one good
reason why i should have too?
I can tell you several:

Because you want something slightly out of the scope of what Visual
Studio does for you. For the same reason that you have to write any of
your own code at all. Because tools are just that: tools. Because
computers aren't intelligent enough to do everything you can do and
force you out of a job. Because if Microsoft made tools that did
everything you and everyone else seem to want them to, (1) They would
be much too complicated to use, and (2) You wouldn't be able to afford
to buy them.

When I started programming I used DOS Edit and a command-line
compiler. As time went by and my skills improved to the point where I
could start making money from my work, I upgraded, and the tools that
are available evolved. But I'm grateful that I had to go through those
times, because I learned a lot about how computers and software work.
And I never complain when I don't have a tool because I can darned
well build my own if I need to (and often do).

I don't expect anything from anyone except myself. And when it's all
said and done, the bottom line is the bottom line. You either produce
or you don't. And your client isn't going to pay you regardless of
whether you produce or not. Your client (or boss) isn't going to
accept any excuses, like "It's Microsoft's fault for making software
that doesn't do what I want it to." You have to learn to be a Chicken
Salad Alchemist, making Chicken Salad out of Chicken s**t. And you
have to accept the fact that what you do will be the only reason that
you will succeed or fail. By the time you reach retirement age your
mother and father, and anyone else who can provide a parachute for you
will be long gone. There's no better time to start preparing for that
eventuality than today.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

I recycle.
I send everything back to the planet it came from.

"Steven Bolard" <steve@xxxxxxxxxx> wrote in message
news:uPhoSDSlGHA.4080@xxxxxxxxxxxxxxxxxxxxxxx
Hello,

Im using VS2005. Microsoft have got some great support for
application settings and the changes to system.configuration and
associated support mechansims seems to be pretty damn good.
What i dont get is why they stupidly force all VS application setting
support of type connection string to be of application scope.

Im the developer. I'll choose thank you very much. I know what i
need. Microsoft have snatched defeat from the jaws of victory on this
one.

I have an application specifically designed for distributor of
similiar products for different brands. Customer wants to keep the
datasets separate because they are essentially two different
companies.
Customer doesn't need to buy two front end licenses, just two back
end licenses to achieve this. Customer want therefore to switch
between databases and therefore want to switch connection strings.

It seems Microsoft force me to keep using my code rather than
leveraging VS to "do this for me". Why because connection string
support is application scope and application scope settings are
readonly.
Sure i can edit VS generated code but can anyone tell me one good
reason why i should have too?

Its stupid.

Steve




.



Relevant Pages

  • Re: Deployment + Vista
    ... The problem is it's connection string is always ... Server settings form. ... possibly occur with a file created by your app. ... I guess it's a good thing I do not use that for settings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Deployment + Vista
    ... The problem is it's connection string is always ... Server settings form. ... possibly occur with a file created by your app. ... I guess it's a good thing I do not use that for settings. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Change Connection String at runtime.
    ... easily moved to another database, or have versions for each database. ... connection string to the connectionobject before the connection opens. ... *The Server IP number is different for every deployment. ... It appears that the generated code uses the application settings to ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Deployment + Vista
    ... The problem is it's connection string is always hard ... Server settings form. ... guess it's a good thing I do not use that for settings. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: vb6 app no longer connects to Access DB on Term Server 2003
    ... we recently upgraded the Terminal Server from the 2000 version to ... we have tried simplifying the connection string by removing the ... Microsoft ActiveX Data Objects 2.8 Library ... We even tried it on Windows Server 2003 ...
    (microsoft.public.data.oledb)