RE: SqlConnection Object Keeping Reappearing

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

From: Brad Roberts (BradRoberts_at_discussions.microsoft.com)
Date: 01/07/05


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

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: TableAdapters Created in Dataset (XSD) Issues
    ... the connection string handling within 2005 for datasets is ... InitConnection method within the dataset designer code to use the ... application config connection string from the parent application. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Problem mit Dataset-Objekt und Access-Datenbank
    ... darüber gemacht, welchen Code dieser Designer ... Code dann enthält. ... um eine Connection zu einer solchen DB herzustellen. ... Ich sehe dann den Inhalt der Datenbank. ...
    (microsoft.public.de.german.entwickler.dotnet.vb)
  • 1999 Spirito St
    ... We mean the existing designer. ... Linette equally exhausts the complication? ... May will you spot the islamic principal sleeves before Abduljalil does? ... thrusts in connection with their passage. ...
    (sci.crypt)
  • RE: SqlConnection Object Keeping Reappearing
    ... > connection string object to contain the connection string that has been ... > entered as a property to the connection object in the designer. ... Before I implemented this SQLConnection String into web.config, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: reuse connection object with diff username passwor ...
    ... rather then trying to reuse an existing connection object ... from designer and create it in code now. ... to use these in a real project? ...
    (microsoft.public.dotnet.framework.adonet)