I dragged an SQL table onto a form, it works, but where is the Open() method being called?

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



I am trying to learn .NET so that I can get a job. I have Visual Studio 2003
& the MSDE database installed.

I am reading the book "Beginning C# Databases", Huddleston et al, and it
showed how to drag a table onto a form, which would create SqlConnection &
SqlDataAdapter (and then through a link, a DataSet) objects. With a few
properties being set, and a Fill() call on the SqlDataAdapter, I was able to
populate a ListBox control using records from the NorthWind database.

OK, that's great, but then I go on reading how the SqlConnection object must
have the Open() and then later Close() methods be called. However, when I go
through the code that Visual Studio set up, I don't see any call to Open().

Am I missing something? Is this Open() being called somewhere "under the
hood"? Why isn't there an explicit call?

Thanks

.



Relevant Pages

  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... Create a Connection object and pass in a ConnectionString to ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: My Book is Incomplete Regarding SQL Commands ;-(
    ... Thanks for posting it. ... Hitchhiker's Guide to Visual Studio and SQL Server ... manage the database table you reference. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: What is .Net?
    ... SQL database be used with ASP and or ASP.Net? ... I have Visual Studio .NET 2003 at home. ... XML, which is a file type (actually much more than ...
    (comp.databases.ms-access)
  • Re: Application Speed Problem - VERY weird
    ... MDE front ends not MDB ... If the DB is reading in a lot of records, ... The data is linked with the standard Access "link ... add that we have only ever used the database on Access 2K. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: What is .Net?
    ... I have Visual Studio .NET 2003 at home. ... once you reference a database (and you ... XML, which is a file type (actually much more than ... the developer, you, and other people consuming your application could ...
    (comp.databases.ms-access)