Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A question about SqlConnection and scope
Message
De
06/05/2005 11:53:43
 
 
À
06/05/2005 08:04:53
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01011433
Message ID:
01011631
Vues:
13
Alex,

The problem with a lot of the books out there (especially the early ones from 3 years ago, which is when I was doing most of my reading) is that the examples are pretty bad. By "bad" I mean that they are often too simplistic (especially when they show direct Data Access from a Form ... that's one of my pet peeves!) Simple examples are ok to get a point across, but then the ideas should be expanded upon and they seldom are. Maybe it's gotten better since then, I don't know.

~~Bonnie



>>You can return the connection object from your connect method:
>>
>>public SqlConnection ConnectToSqlServer()
>>
>>
>>~~Bonnie
>
>
>That works!
>
>I had not made the connection (pun intended) when reading about scope and declaring variables and fields that you can define types other than the standard book samples: int, string, etc.
>
>Works like a charm.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform