I have a question, please correct me if I am wrong.
I am assuming that a dataadapter establishes a connection and after filling
the dataset or datatable or whatever, will close the connection to the DB
right???
If yes, is there any reason that the connection get disconnected/timeout
and how can i find out what happened?
Thanks,
Stephen 3 1982
Search on "Lutz Reflector" and download his tool.
You can use it to view the .NET Framework source code.
Yes, if a connection has not been established on
the DataAdapter, it does create its own and closes
it upon completion.
I'd have to look at the .NET Framework source
code again to see if it throws an error.
--
Robbe Morris - 2004/2005 Microsoft MVP C#
Free Source Code for ADO.NET Object Mapper To DataBase Tables And Stored
Procedures http://www.eggheadcafe.com/articles/..._generator.asp
"Stephen Noronha" <st********@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... I have a question, please correct me if I am wrong.
I am assuming that a dataadapter establishes a connection and after filling the dataset or datatable or whatever, will close the connection to the DB right???
If yes, is there any reason that the connection get disconnected/timeout and how can i find out what happened?
Thanks, Stephen
Hi Robbe,
thanks for the reply. this post is wrt a problem i am facing with filling a
dataset using Dataadapter.
I have tested a stored procedure using Query Analyser, it works (it takes a
long time... but it does)
I use this SP in my app and fill up a dataset. I have not "Connection
timeout" parameter set but at "da.fill(ds)" in a matter of like a min, i get
a SQL Exception for a "Timeout", i am still not able to figure out where is
this timeout occuring?
any Sugesstions?
Thanks,
Stephen
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message
news:%2******************@TK2MSFTNGP14.phx.gbl... Search on "Lutz Reflector" and download his tool. You can use it to view the .NET Framework source code.
Yes, if a connection has not been established on the DataAdapter, it does create its own and closes it upon completion.
I'd have to look at the .NET Framework source code again to see if it throws an error.
-- Robbe Morris - 2004/2005 Microsoft MVP C# Free Source Code for ADO.NET Object Mapper To DataBase Tables And Stored Procedures http://www.eggheadcafe.com/articles/..._generator.asp
"Stephen Noronha" <st********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...I have a question, please correct me if I am wrong.
I am assuming that a dataadapter establishes a connection and after filling the dataset or datatable or whatever, will close the connection to the
DB right???
If yes, is there any reason that the connection get
disconnected/timeout and how can i find out what happened?
Thanks, Stephen
This maybe the command timing out.
After you create the dataadapter, set the command timeout on the
SelectCommand. Alternatively, if you want full control over the connection
and the command, create the connection object first, set the timeout, open
the connection, create the command object, set the timeout on this also, set
the command text and then create the dataadapter using the command object in
the dataadapter constructor.
Landers
"Stephen Noronha" <st********@hotmail.com> wrote in message
news:ev*************@tk2msftngp13.phx.gbl... Hi Robbe, thanks for the reply. this post is wrt a problem i am facing with filling
a dataset using Dataadapter.
I have tested a stored procedure using Query Analyser, it works (it takes
a long time... but it does) I use this SP in my app and fill up a dataset. I have not "Connection timeout" parameter set but at "da.fill(ds)" in a matter of like a min, i
get a SQL Exception for a "Timeout", i am still not able to figure out where
is this timeout occuring?
any Sugesstions? Thanks, Stephen
"Robbe Morris [C# MVP]" <in**@eggheadcafe.com> wrote in message news:%2******************@TK2MSFTNGP14.phx.gbl... Search on "Lutz Reflector" and download his tool. You can use it to view the .NET Framework source code.
Yes, if a connection has not been established on the DataAdapter, it does create its own and closes it upon completion.
I'd have to look at the .NET Framework source code again to see if it throws an error.
-- Robbe Morris - 2004/2005 Microsoft MVP C# Free Source Code for ADO.NET Object Mapper To DataBase Tables And Stored Procedures http://www.eggheadcafe.com/articles/..._generator.asp
"Stephen Noronha" <st********@hotmail.com> wrote in message news:%2****************@TK2MSFTNGP12.phx.gbl...I have a question, please correct me if I am wrong.
I am assuming that a dataadapter establishes a connection and after filling the dataset or datatable or whatever, will close the connection to the DB right???
If yes, is there any reason that the connection get disconnected/timeout and how can i find out what happened?
Thanks, Stephen
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: hch |
last post by:
dataAdapter.Update(data, "TableName") won’t work!
I was about to deploy my first website on the Internet only to discover that
the dataAdapter.Update() throws the Server Error in the third...
|
by: Geoff Pennington |
last post by:
I have a class method that returns a DataAdapter. I want to access the
table(s) contained in the DataAdapter. Of course, accessing the DataSets
would be good enough, because I could get the tables...
|
by: Doug Bell |
last post by:
Hi,
I thought I had this sorted this morning but it is still a problem.
My application has a DataAccess Class.
When it starts, it:
Connects to a DB (OLE DB)
If it connects it uses an...
|
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.
...
|
by: susan.f.barrett |
last post by:
Hi,
Despite me being able to type the following in to SQL Server and it
updating 1 row:
> updatestockcategory 1093, 839
In my code, it is not updating any rows.
dataSet = new DataSet();
|
by: Max |
last post by:
I've included the needed tables in the DataSource. Those tables that are
bound to controls I can workwith. But how do you get access to the
DataAdaptors that are not bound?
me.Dataset1.table...
|
by: Rich |
last post by:
Dim da As New SqlDataAdapter("Select * from tbl1", conn)
dim tblx As New DataTable
da.Fill(tblx) '--works OK up to this point
da.UpdateCommand = New SqlCommand
da.UpdateCommand.Connection =...
|
by: Rich |
last post by:
What is the diffeence bewtween a dataAdapter.InsertCommand and
dataAdapter.SelectCommand (and dataAdapter.UpdateCommand for that matter)?
Dim da As SqlDataAdapter
conn.Open
da.SelectCommand =...
|
by: BobLewiston |
last post by:
I can read in an SQL table ("Person.Contact") from AdventureWorks and step through it one row at a time, but when I try to save a record, either one I'm inserting or one I'm editting, I get the...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
|
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...
| |