U
Unemployed Programmer
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
& 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