473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Binding SqlDataReader to webcomponents

me
Why is SqlDataReader not present in visual studios Toolbox->Data where
I find components like DataSet? Most examples in books and in vs.net
are based on datasets but using disconnected tables seems a bit
heavyweight for most purposes. I there some particular reason to stay
away from sqldatareader??
I have managed to bind components using sqldatareader but digging up
the
information was quite hard.
Nov 18 '05 #1
1 1425
There is no particular reason to stay away from SqlDataReader. IMHO, I
always use SqlDataReader if I have controls that cause autopostback because
using DataSet causes my ViewState to become extremely large. If you are
simply querying a database and spitting the results straight into a control
without doing any processing, then I would recommend SqlDataReader. If you
want to manipulate the data post-query (sort, filter, etc.), then DataSet
would be the way to go.

HTH,
Mark Jen [MSFT]
--
Please reply in newsgroup.
This posting is provided "AS IS" with no warranties, and confers no rights.
"me" <wt*****@forum. dk> wrote in message
news:6f******** *************** ***@posting.goo gle.com...
Why is SqlDataReader not present in visual studios Toolbox->Data where
I find components like DataSet? Most examples in books and in vs.net
are based on datasets but using disconnected tables seems a bit
heavyweight for most purposes. I there some particular reason to stay
away from sqldatareader??
I have managed to bind components using sqldatareader but digging up
the
information was quite hard.

Nov 18 '05 #2

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

Similar topics

2
1281
by: Murali | last post by:
We r using a single aspx page for insertion ,updation and deletion of data.In each cases we want to hide a lot of web components in a single form.Now we r hiding each component using the visibility property of components.But we want to avoid this one because (eg: if there r 20 components then we have to set the visibility of each component separately)How to set visible properties of all webcomponents in the form in a single statemen
2
2233
by: rmorvay | last post by:
I am trying to dynamically build a dropdownlist and bind it to a cell in a grid. I tried to utilize the following code but I am stuck at the point where I bind the dropdownlist to the grid cell. I get the following message for this code but I suspect that the " UltraWebGrid1.Rows.Cells.Value = ddlGeography;" is not how you bind the dropdownlist control to the grid. ERROR: "The type 'System.Web.UI.WebControls.DropDownList' must be...
0
1761
by: ani | last post by:
Hi, I have a datalist control and within the Itemplate I have a radiobuttonlist control . I am binding data to the datalist control in Page_load . Also I have sqldatareader object that needs to be binded to the radiobutton list. I am not able to bind the datareader to the radiobuttonlist control as it is within the Itemtemplate. I am new to .Net. Could someone please let me know what I should be
1
1555
by: mike | last post by:
I'm having a problem with binding my sqldatareader to my datagrid in my asp .net page. Below is my code in the page_load section of the code behind page: Dim oCon2 As SqlClient.SqlConnection = New SqlClient.SqlConnection("data source=Test;initial catalog=data1;password=;user id=sa;packet size=4096") oCon2.Open()
3
1019
by: Joe Delphi | last post by:
Hi, I am attempting to bind a dropdown list to a SQLDataReader My code looks like this: Dim DBComm As New SqlCommand Dim DBReader As SqlDataReader DBComm.Connection = DBConn DBComm.CommandText = "SELECT TESTER FROM PERSONNEL ORDER BY TESTER" DBReader = DBComm.ExecuteReader()
5
1890
by: Laura K | last post by:
I am having difficulty binding data to my datalist. The data list does not show. I have gone round and round for two days. I could really use some help looking through this code and seeing where the error is. It is usually something simple but I just can not find it!!! Any suggestion? -------------------------------------------------------------------------- My HTML code is:
0
3486
by: webmaster | last post by:
Pardon my being a total C# noob. I'm trying to take apart the dotNet Time Tracker dotNet C# starterkit sample application and replicate a part of the code. At a high level, I have a very simple SQL server table and stored procedure which I have no problems binding from directly from an ASP.NET control... Table BOOK
1
1761
by: js | last post by:
I am using executeReader to get a SqlDataReader as in my code below. The SqlDataReader contains two tables. I am trying to bind each table to its respective dropdown list control. Thanks. //************* My code ************* System.Data.SqlClient.SqlDataReader dr = null; string strSQL = "SELECT id, iorg_name FROM int_org order by iorg_name;" + "select id, l_name from loc order by l_name";
5
1210
by: brettokumar | last post by:
hi i am binding values from database to ddl through sqldatareader records are binding in my dripdownlist but my first record is dosen't bind i.e if i have 4 records in my table. ddl is binding only three records from 2 to 4 only dosen't bind 1st record. shall i know what is the problem please help me...
0
8392
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
8823
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
8730
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
8503
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
8605
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
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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

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.