Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > ADO.NET
|
ADO.NET For discussion about ADO.NET.  Topics such as question regarding the System.Data namespace are appropriate.  Questions specific to a particular application should be posted in a forum specific to the application .
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ADO.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2004, 01:01 AM
Authorized User
 
Join Date: Aug 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Urgent getting Error while using SqlDataReader

When i start my web application and try to read data from my SQL Server using SqlDataReader I getting error :
Invalid attempt to read when no data is present.

Plz help me its urgent.

 
Old September 29th, 2004, 09:59 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Could you post code?
 
Old September 29th, 2004, 10:03 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Oh wait, are you doing While objDataReader.Read() to access the data? You have to do it like this:

http://msdn.microsoft.com/library/de...sreadtopic.asp





Similar Threads
Thread Thread Starter Forum Replies Last Post
sqldatareader close connection mdonner BOOK: Beginning ASP.NET 1.0 2 July 5th, 2007 04:50 AM
Inheriting SqlDataReader and new KeyWord software_developer_kk C# 2 June 28th, 2007 08:17 AM
System.Data.SqlClient.SqlDataReader - URGENT wk ASP.NET 2.0 Basics 8 September 27th, 2006 05:00 AM
SqlDataReader testsubject ADO.NET 9 March 7th, 2006 06:08 PM
looping through columns in sqldatareader rlull ASP.NET 1.0 and 1.1 Basics 1 November 5th, 2005 02:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.