473,404 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

DataAdapter.Dispose

Hi All,

You may have seen my post earlier in the week about using conn.close and
conn.dispose (Thanks Karl for your answers!)

I've read in my MS study guide that DataAdapters open and close database
connections automatically.

So, can I just call DataAdapterInstance.Dispose ?

Previously I have called conn.close (conn.dispose from now on!) but is
there
any need for me to explicily close the connection?

Maybe I'm splitting hairs here...70-305 exam this afternoon! would be good
to know.

Cheers!
Simon.
--
I am using the free version of SPAMfighter for private users.
It has removed 2440 spam emails to date.
Paying users do not have this message in their emails.
Try www.SPAMfighter.com for free now!
Nov 19 '05 #1
1 1401
Dispose is freeing the connection, there is no need to call both
Dispose and Close. If are are using the Fill method on the data
adapter, then the adapter will open the connection if it isn't open,
and if the adapter opens the connection it will also properly clean it
up before the Fill method returns.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 2 Jun 2005 11:17:27 +0100, "Simon Harris"
<to***********@makes-you-fat.com> wrote:
Hi All,

You may have seen my post earlier in the week about using conn.close and
conn.dispose (Thanks Karl for your answers!)

I've read in my MS study guide that DataAdapters open and close database
connections automatically.

So, can I just call DataAdapterInstance.Dispose ?

Previously I have called conn.close (conn.dispose from now on!) but is
there
any need for me to explicily close the connection?

Maybe I'm splitting hairs here...70-305 exam this afternoon! would be good
to know.

Cheers!
Simon.


Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Joe Fetters via .NET 247 | last post by:
Have googled and read the VS.NET documentation can't seem to getthe answer to the following. Environment: Framework 1.1 VB.NET WinForm Access database Using all automagic tools (DataAdapter...
1
by: Agnes | last post by:
in my dataadapter's command text, I only select the current month records and then use binding manager to bind it. The user can press'button' to move forward or backward to that record. I need to...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
4
by: George | last post by:
Got a question about the side effect of DataAdapter.Update() and DataTable.GetChanges(). Say I set up a DataTable and a DataAdapter in a class. Delete (Not remove) a row in the data table and...
2
by: MDB | last post by:
Hello All, I have a data grid that I fill using a dataset. The results of the query has around 15 columns and 500 rows (and growing). The reason I am using the datagrid is so the end users can...
0
by: Hexman | last post by:
Hello All, I'm stumped with this one. I have a Database table ("PROD") and I have set up 2 different opens for it. As you can see I alias two of the columns in the first open. I run...
2
by: Frogpolish | last post by:
well after searching ans coming up with nothing i figured id post something in here to see if i could get some help. i have an access db that keeps track of flights that ive flown. its a logbook...
0
by: murugavelmsc | last post by:
Hi, I develop a code for data manipulation i.e (first, next, previous and last record). i try the below mentioned code, In this, i click next button -- move the next record. i click one more...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.