RE: SqlConnection Object Keeping Reappearing

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: MrMike (MrMike_at_discussions.microsoft.com)
Date: 01/07/05


Date: Fri, 7 Jan 2005 06:21:01 -0800

That explains it - Thanks!

"Brad Roberts" wrote:

> You may be enlightened if you take a look at the "web designer generated
> code" that is in the code-behind file. When you have connection objects
> inserted in the designer the development environment will probably create the
> connection string object to contain the connection string that has been
> entered as a property to the connection object in the designer.
>
> Take care to avoid modifications to the code that is generated until you are
> familiar with what is going on.
>
> Note that you can write the code yourself, without the designer, to
> accomplish the same thing.
>
> "MrMike" wrote:
>
> > I have a web.config file containing the SQLConnection String to a SQL
> > Database. Before I implemented this SQLConnection String into web.config, I
> > had individual SQLConnection objects in each webform's designer tray. I am
> > now going back through the webforms and replacing the individual
> > SQLConnection Objects with a pointer to web.config ConnectionString.
> >
> > However, whenever I delete the SQLConnection String objects from each
> > webform, they reappear the next time I open the webform. Why do these things
> > reappear? I'm making no references to them in the code-behind, so why do
> > they reappear?
> >
> > Thanks.



Relevant Pages

  • Re: linqdatasource runtime connection string
    ... Why are you not setting it than in this case hardcoded in your datacontext and remove the string from the config file. ... When I dragged the first object it made a connection string in my web.config ... designer and the connection string will get set to XXX for use in Production. ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SqlConnection Object Keeping Reappearing
    ... You may be enlightened if you take a look at the "web designer generated ... When you have connection objects ... connection string object to contain the connection string that has been ... Before I implemented this SQLConnection String into web.config, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Multipart connectionstring question
    ... I’ve got an asp.net site that contains an access database. ... running the same app both on my machine and my host without making changes. ... How could one even use a server.mappath with a database connection string? ...
    (microsoft.public.dotnet.general)
  • Installer - Custom Textboxes in UI problem
    ... void Install function. ... I've tested it by writing the string out to a text file ... put the connection string and I intend to test the db connectivity and write ... throw new InstallException("The database conection information is not ...
    (microsoft.public.dotnet.languages.csharp)
  • Not first class in file
    ... loading the designer again. ... Public strTo As String ... ' This call is required by the Component Designer. ... Protected Overloads Overrides Sub Dispose ...
    (microsoft.public.dotnet.languages.vb)