Re: Ways to read data through SQL queries Programming Software Development by Sulaiman_1 Datareader needs an opened database connection. Its an Connected Oriented Architecture … Re: Getting problem with Null Value Programming Software Development by Teme64 Datareader has IsDBNull method, use that: [CODE=VB.NET]If reader.IsDBNull("maxV") Then ' Value is null, handle it Else ' Value is not null, use the value End If[/CODE] HTH DataREader Programming Software Development by vasto_lordes Hi everyone....i need some hep concerning data reader...i've aways use dataset for retrieving and updating data from an access database...now i would ike to know how to user the DATAREADER to do the same thing... Thanks in advance DataReader Vs DataSet Programming Web Development by bshyama24@gmail Hi All, as per as I know dataset can do the work of datareader.Only the difference in connected and disconnected architecture.But Is there any area where we have to use only datareader without dataset? Datareader's row count? Programming Software Development by fx5500 … I how can i know that, how many row this datareader have? [CODE] string query_ci = "SELECT [Kolon1],[Kolon2],[Kolon3] FROM… Re: DataReader Vs DataSet Programming Web Development by Ramesh S If you need read-only access to the data, something often done inside an ASP.NET application, using a DataReader makes sense. For example, you are filling the textboxes/label controls in a page, then you can use data reader. You can use datasets if you are going to persist the data between postbacks. Re: DataReader Vs DataSet Programming Web Development by dnanetwork using datareader you drag the data out of the database faster and using dataset things work lilttle slower but add on features are granted like caching any many more.. Re: Datareader's row count? Programming Software Development by Momerath Since DataReader is a forward only reader, there is no way to know how many records are available from a Select statement. You'll have to count them as you read them. So initialize a counter before the while loop, and increment in the while loop. At the end you'll know how many records there were. Re: Datareader's row count? Programming Software Development by alc6379 … can't know ahead of time how many rows the datareader is going to return, unless the answer is 0… Datareader...i need help urgently... Programming Software Development by nandhini21 … username exist, it compares with the password. I'm using datareader to do this. Please guide me through this. Actually, there… DataReader problem Programming Software Development by magl8036 Hi, I'm trying to use datareader to retrieve a column and place the value in a … datareader in While loop Programming Web Development by sakhi kul … query atleast 5 times with different options. so I execute datareader in while loop. let considetr opt1 is my variable name… DataReader clean up Programming Software Development by snakay … what I do. I use a class to prepare my datareader. If only one reading no problem so far. But with… datareader to select three rows at a time Programming Software Development by tariqi … sends 'next'.am using a 'do loop while' and a datareader but its not working how i want,below is the… Re: Datareader check value Programming Software Development by Oxiegen …() Then If Not IsDBNull(dataReader("dateColumn")) Then Dim dateTest As DateTime ' Test to … value in the database is a date If DateTime.TryParse(dataReader("dateColumn"), dateTest) Then If dateTest = DateTime.Now Then… Re: Datareader check value Programming Software Development by kvprajapati [b]>How can i check if some value exists in the data reader How can i do that ?[/b] [code] IF dataReader.Read() Then IF IsDBNull(dataReader("col1")) Then ... ELSE .... END IF End If [/code] Re: Datareader check value Programming Software Development by bninja It does not work :'( The column1 in datareader is a datetime in the DB So maybe i don't need to check if its date or not. Re: Datareader check value Programming Software Development by kvprajapati Read post #2 and #4 - dataReader.Read() method returns true if value exists, return false otherwise. Re: Datareader check value Programming Software Development by Oxiegen … value in the database is a date If DateTime.TryParse(dataReader("dateColumn"), dateTest) Then If dateTest = DateTime.Now Then… Re: DataReader Error (Looks Simple) Programming Software Development by sheennave Dear posters, It's tricky.. DataReader works fine in the following example : [CODE] System::String ^name_string; … Re: Error in reading DataReader Programming Software Development by maestridaniele …Thanks Tank50[/QUOTE] //**************************************************** Hi, try this code to read datareader... [I]// Instance a new object[/I] Object a =… datareader is null[/I] if (datareader == null) return; [I]// Get data from datareader[/I] while (datareader.Read()) { // Code example... a = datareader.… how to bind a dropdown list using the datareader? Programming Web Development by kgenn … UNIQUE_C from tblLupon_C", connection) Dim DataReader As OleDbDataReader DataReader = command.ExecuteReader() GridView1.DataSource = DataReader GridView1.DataBind() connection.Close() End Sub[/…CODE] how to bind a dropdown list using the datareader? how can i add item(s) in the dropdown… Error message when datareader read Programming Software Development by Tank50 Hi I got a error message once ,I read datareader.The error message is"Invalid attempt to read when … I missed the sqldatareader.Read() method.once I put the datareader.Read method still I got the same error. String str_string1… there is error when there is no data available in datareader Thanks Tank50 C# DataReader to Two Dimensional Array? Programming Software Development by bill_kearns …to get multiple column fields from different rows of a DataReader, do some math and output the results. The …table columns I am using in the DataReader are: [B][Vendor Name][/B] NvarChar [B][Budget … Double - Vendors total budget allowance for the year My DataReader returns about 400 rows which detail annual spending of 85… how to write table in xml through datareader Programming Software Development by jainendra.shah hi frds, I want to write a table in xml file by datareader directly. but I dont know how i write directly. I don't want to use dataset b'coz my table ir very large. And dataset is slower then datareader. So provide help. thank you how to retrieve 2nd row of a column from datareader object Programming Software Development by udeep.kansal …... i want to show 1st row value of datareader..... if seattype_code == "00", 2nd row value if seattype_code == &… Re: Error in reading DataReader Programming Software Development by djjaries …first. [code=c#] void ReadData(SqlConnection conn, string sql) SqlDataReader datareader; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.…CommandText = sql; datareader = cmd.ExecuteReader(); while (datareader.Read()) { // perform your code here } } [/code] Cheers,… Re: Error message when datareader read Programming Software Development by Tank50 HI yes.I need While loop.I didnt use that coz In my datareader only one record avaliable ,So I thought no need of while loop.Now I fix it. Thanks Tank50 casting datareader value to a to a Nullable variable Programming Databases by adam2009 I'm trying to run the following code but get a casting error. How can I rewrite my code to achive the same ? [CODE] boolResult= (bool?)dataReader["BOOL_FLAG"] ?? true; intResult= (int?)dataReader["INT_VALUE"] ?? 0;[/CODE] Thanks Re: connection pool and datareader errors Programming Web Development by sknake … on the caller because when you attempt to access the DataReader it will report a closed connection. Another approach you may… base class, but port the concept over of using the datareader and returning a datatable. I hope this helps