473,513 Members | 2,678 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does the SQLDatasource control produce a disconnectected recordset?

Hi all,
I am relatively new to ASP.NET 2.0 programming. I have some experience with
classic ASP and VB6. In Visual Web Developer (VS 2005) there a numerous ways
to work with data. In my application I am using a number of them, including
the SQLDataAdapter, DataTables, etc.

On one page I have chosen to use the SQLDatasource in conjunction with an
ASP Repeater control, because it was by far the quickest implementation for
my needs. However, I want to make sure I am getting a disconnected recordset
to work with. One that has closed the connection to the DB Server and will
not place any kinds of locks on the DB that might impede other users who
need exclusive locks to write to the table.

I have not found an answer for this question in the 4 books I have purchased
or in the VS 2005 documentation.

Thanks all in advance...

Feb 22 '07 #1
2 3462
You can determine whether the item will be disconnected based upon which
type of resultset it returns. If it returns a dataset should be disconnected
because it is composed of datatables. A datatable is always loaded and then
it releases the connection. A DataReader is connected until it is closed and
pretty much always connected until you're done with it. The SQLDatasource
has a property called DataSourceMode that can be used to determine which it
will use, a DataSet or a DataReader. Go for the DataSet as that should give
you load it and release it data method.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"John Kotuby" <jo***@powerlist.comwrote in message
news:uu**************@TK2MSFTNGP06.phx.gbl...
Hi all,
I am relatively new to ASP.NET 2.0 programming. I have some experience
with classic ASP and VB6. In Visual Web Developer (VS 2005) there a
numerous ways to work with data. In my application I am using a number of
them, including the SQLDataAdapter, DataTables, etc.

On one page I have chosen to use the SQLDatasource in conjunction with an
ASP Repeater control, because it was by far the quickest implementation
for my needs. However, I want to make sure I am getting a disconnected
recordset to work with. One that has closed the connection to the DB
Server and will not place any kinds of locks on the DB that might impede
other users who need exclusive locks to write to the table.

I have not found an answer for this question in the 4 books I have
purchased or in the VS 2005 documentation.

Thanks all in advance...


Feb 22 '07 #2
Thanks muchly Mark..

That's what I needed.
.... John

"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:Ow**************@TK2MSFTNGP05.phx.gbl...
You can determine whether the item will be disconnected based upon which
type of resultset it returns. If it returns a dataset should be
disconnected because it is composed of datatables. A datatable is always
loaded and then it releases the connection. A DataReader is connected
until it is closed and pretty much always connected until you're done with
it. The SQLDatasource has a property called DataSourceMode that can be
used to determine which it will use, a DataSet or a DataReader. Go for the
DataSet as that should give you load it and release it data method.
--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"John Kotuby" <jo***@powerlist.comwrote in message
news:uu**************@TK2MSFTNGP06.phx.gbl...
>Hi all,
I am relatively new to ASP.NET 2.0 programming. I have some experience
with classic ASP and VB6. In Visual Web Developer (VS 2005) there a
numerous ways to work with data. In my application I am using a number of
them, including the SQLDataAdapter, DataTables, etc.

On one page I have chosen to use the SQLDatasource in conjunction with an
ASP Repeater control, because it was by far the quickest implementation
for my needs. However, I want to make sure I am getting a disconnected
recordset to work with. One that has closed the connection to the DB
Server and will not place any kinds of locks on the DB that might impede
other users who need exclusive locks to write to the table.

I have not found an answer for this question in the 4 books I have
purchased or in the VS 2005 documentation.

Thanks all in advance...



Feb 22 '07 #3

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

Similar topics

5
4459
by: Martin Bischoff | last post by:
Hi, is it possible to modify the values of a SqlDataSource's select parameters in the code behind before the select command is executed? Example: I have an SqlDataSource with a...
2
6069
by: wubin_98 | last post by:
Hi All, Could any expert point out what is wrong in my code? I search around but couldn't found answer. It seems that I am the first person have this problem. Thanks in advanced I have a...
2
19762
by: phil | last post by:
Hi, I want to put a recordset in a gridview but i don't know how to pass the value of the variable in the 'where' statement. The value of the variable is set in the code-behind. i added a tag...
0
1220
by: kurt.craver | last post by:
I have a component control that I created as a UserControl which contains a SqlDataSource control, a GridView control, a DropDownList control, a TextBox control, and a Button control. The idea is...
2
9881
by: Ned Balzer | last post by:
I'm trying to create a formview bound to a sqldatasource, and use a stored procedure to insert data from the formview into several tables. I have some simplified code below, the real code is much...
0
2539
by: mike | last post by:
Hi, When I programatically Bind a DataSource to DetailsView it does not fire "ModeChanged" event. This is first time i am trying to use ASP.NET DetailsView control. I have played with some of the...
1
4259
by: Corey B | last post by:
I have a page with a DetailsView control and a SQLDataSource control. The SQLDataSource control is connected to an Access database. Everything works fine. Now I want to change the back end...
1
6112
by: sheenaa | last post by:
Hello Members, I m creating my application forms in ASP.Net 2005 C# using the backend SQL Server 2005. What i have used on forms :: ? On my first form i have used some...
4
6121
by: =?Utf-8?B?TWFkaXNvbg==?= | last post by:
Hi all, Could I use the sqldatasource with stored-procedure to return multiple recordset? I did not want to have any sqldatasourec in the one page just to return the record back to...
0
7157
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
7379
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
7535
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...
1
7098
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
5682
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,...
1
5084
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1591
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 ...
1
798
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.