473,659 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataAdapters and Connections

JJ

I was wondering if I have an existing DataAdapter created
and I had killed the connection to it. How do I setup a
new connection to same DataAdapter without having to
resetup the DataAdapter? So reconnect the DataAdapter
after a disconnect is what I'm after.

Thanks,

JJ
Nov 15 '05 #1
3 1205
Why? Just destroy it and create a new one. Why do you want to hold on to it?

--
_______________ _____
Klaus H. Probst, MVP
http://www.vbbox.com/

"JJ" <an*******@disc ussions.microso ft.com> wrote in message
news:93******** *************** *****@phx.gbl.. .

I was wondering if I have an existing DataAdapter created
and I had killed the connection to it. How do I setup a
new connection to same DataAdapter without having to
resetup the DataAdapter? So reconnect the DataAdapter
after a disconnect is what I'm after.

Thanks,

JJ

Nov 15 '05 #2
JJ
Do u mean the DataAdapter Destroy or the connection?

JJ

-----Original Message-----
Why? Just destroy it and create a new one. Why do you want to hold on to it?
--
______________ ______
Klaus H. Probst, MVP
http://www.vbbox.com/

"JJ" <an*******@disc ussions.microso ft.com> wrote in messagenews:93******* *************** ******@phx.gbl. ..

I was wondering if I have an existing DataAdapter created and I had killed the connection to it. How do I setup a
new connection to same DataAdapter without having to
resetup the DataAdapter? So reconnect the DataAdapter
after a disconnect is what I'm after.

Thanks,

JJ

.

Nov 15 '05 #3
JJ <an*******@disc ussions.microso ft.com> wrote:
I was wondering if I have an existing DataAdapter created
and I had killed the connection to it. How do I setup a
new connection to same DataAdapter without having to
resetup the DataAdapter? So reconnect the DataAdapter
after a disconnect is what I'm after.


What kind of DataAdapter is it? If you change the connection within
each of the Command objects of a SqlDataAdapter, for instance, I would
imagine that would do the trick.

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4

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

Similar topics

3
2404
by: Mudge | last post by:
Hi, My hosting provider only allows me to use 50 connections to my MySQL database that my Web site will use. I don't know what this 50 connections means exactly. Does this mean that only 50 visitors to my Web site can access my database through my Web site at one time? Or does this mean that in my code I can only use 50 connections? and like
0
1507
by: hillscottc | last post by:
I have two DataAdapters....1)daStandard does a SELECT *, and 2)daDuplicates uses a stored proc which returns only rows with some duplicate data. Problem is, when I butRefresh_Click and I have selected ALL, I am never able to refresh the data to the DUPS subset of data. Every click returns ALL records. If I choose DUPS the first time it works once, but once I do ALL I can no longer get just the DUPS.
2
1295
by: Vik | last post by:
Is it possible to loop through all dataadapters on page? Thanks
4
1273
by: Jon Maz | last post by:
Hi, I just read the following in an old NG thread: "when you use the adapter with a closed connection it will open it, do your requested database access, and close it immediately. If you use the adapter with an open connection the connection will continue to be open after the adapter is done." My DataLayer makes extensive use of DataAdapters to fill DataSets, and
17
8437
by: Peter Proost | last post by:
Hi Group, I've got an interesting problem, I don't know if this is the right group but I think so because everything I've read about it so far says it's a .net problem. Here's the problem, we're using crystal reports 9 and vb.net and we're using the crystalrepotViewer to show our reports. But every time we open a report the connection to or sql server remains, so if I open 5 forms with the report viewer I've got 5 sleeping connections in...
2
1667
by: JohnT | last post by:
Okay... I'm using VB.net (2003) and I am accessing an MS Access DB file. I have two DataAdapters that I use to search for specific info. The two of them are similar except one is a Date, the other is a String. Currently they both work as I like and I can get my data as I want. What I'm intersted in is seeing HOW I do a Global search for both cases. Here are my two issues: ISSUE 1:
0
1051
by: Tina | last post by:
I converted my project and it runs ok but when I look at that .aspx page there are no dataadapters. I have tried help and msdn search with words like "conversion" "upgrade" " 2003 to 2005" and many others but I can't find any help on general knowledge on how to deal with converted projects. Can anyone point me to the hidden help? Thanks, T
0
976
by: drisso | last post by:
I found it convenient in asp.net 1.1 that you could easily define a dataadapter through a wizard and when the page reloads the initialize component would recreate it for you each time. Now that the initialize component in 2.0 is only called once when the application loads each time a call back is done or the page load is called the dataadapter is null. Is there anyway that I don't have to create the dataadapter manually in the pageload? ...
5
3385
by: Usman Jamil | last post by:
Hi I've a class that creates a connection to a database, gets and loop on a dataset given a query and then close the connection. When I use netstat viewer to see if there is any connection open left, I always see that there are 2 connections open and in "ESTABLISHED" state. Here is the piece of code that I'm using, please tell where I'm doing it wrong. Since this class is being used at many placed in my actual web based application that...
0
874
by: gjok | last post by:
Hi. I have a few questions and I am hoping some kind programmer out there can offer me some guidance. I am trying to understand database interaction in .NET, and I'm having a really hard time as I have previously only used recordsets with Classic ASP. Question 1. I beleive that a DataReader is the nearest thing to Classic ASP Recordset. Is this correct? Question 2.
0
8428
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8339
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8751
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8535
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8629
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4338
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2757
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1982
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.