1. If ADO .Net supports disconnected architecture why do we have to close a
connection after we open it? Isn't ADO .Net supposed to do that automaticall
y
since it supports the disconntected architecture?
2. Why is it that i don't have to open a connection (by writing e.g.
Conn.Open)
after i establish a connection visually through the Server Explorer? Does
establishing a connection through the Server Explorer automatically opens th
e
connection?
3. What are the rules regarding how many datasets you can have in one
application.
Any insights on these matters will be highly appreciated by this novice.
Many thanks for Aaron's help last time. It was very useful.> 1. If ADO .Net supports disconnected architecture why do we have to close
> a
> connection after we open it? Isn't ADO .Net supposed to do that
> automatically
> since it supports the disconntected architecture?
ADO.Net support both connected and disconnected models. The Close method
gives you more control over when the connection is released. For example,
if you need to load several datasets, you can load all using the same open
connection and then call close when you are done. This is more efficient
that opening/closing a connection for each dataset.
> 2. Why is it that i don't have to open a connection (by writing e.g.
> Conn.Open)
> after i establish a connection visually through the Server Explorer? Does
> establishing a connection through the Server Explorer automatically opens
> the
> connection?
The GUI opens a SQL Server connection just like any other SQL Server
application. You can see the activity with a Profiler trace.
> 3. What are the rules regarding how many datasets you can have in one
> application.
AFAIK, available memory.
Hope this helps.
Dan Guzman
SQL Server MVP
"Nab" <Nab@.discussions.microsoft.com> wrote in message
news:470255AF-D517-4ADF-8104-C904D0106DAD@.microsoft.com...
> 1. If ADO .Net supports disconnected architecture why do we have to close
> a
> connection after we open it? Isn't ADO .Net supposed to do that
> automatically
> since it supports the disconntected architecture?
> 2. Why is it that i don't have to open a connection (by writing e.g.
> Conn.Open)
> after i establish a connection visually through the Server Explorer? Does
> establishing a connection through the Server Explorer automatically opens
> the
> connection?
> 3. What are the rules regarding how many datasets you can have in one
> application.
> Any insights on these matters will be highly appreciated by this novice.
> Many thanks for Aaron's help last time. It was very useful.
>
>
2012年3月20日星期二
Disconnected architecture and other issues
标签:
aconnection,
ado,
architecture,
database,
disconnected,
microsoft,
mysql,
net,
oracle,
server,
sql,
supports,
supposed
订阅:
博文评论 (Atom)
没有评论:
发表评论