CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
   Explore    Item Entry    Profile    Invite   History    Resources   SiteMap  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML




Zone: > newsgroup > asp.net forum > starter_kits_and_source_projects.portal_starter_kit Tags:
Item Type: NewsGroup Date Entered: 11/8/2002 9:59:09 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
byoung
Asp.Net User
Error: No data exists for the row/column.11/8/2002 9:59:09 PM

0/0

I'm converting the free Survey Module from the SQL one into an Access Database version. It's been quite educational, which is mostly what I'm doing it for right now.

Anyway, I've worked through many error messages, and have come to one I just can't crack myself. I've tried doing some searching on the web but I can't find a solution to my headache. The problem is when I add the Survey Module to a page it doesn't have any default question or anything in the database. Problem is, when the page loads it tries to find out if there are any questions, and when it runs this particular module it errors out complaining the following error message:

Exception Details: System.InvalidOperationException: No data exists for the row/column.

Here is what is calling the function, from the .ascx page:
----
Dim RowCount As Integer = 0
RowCount = SurveyCheck.ExistSurvey(ModuleId)
If RowCount > 0 Then...
-----

Here is the entire function. I do now that if I manually add a Survey Question into the database then this does not occur. So I'm guessing that since there is nothing setup in the database that it is freaking over a null value or some type of thing. I've gone over the SQL method and the Access method a few times and can't seem to find out if I can set a trap to set a default if no records are returned. Help!
---
Public Function ExistSurvey(ByVal ModuleID As Integer) As Integer
Dim myTools As New Tools()
Dim myRTConnection As String = myTools.GetConnectionString()

'<-- Create Instance of Connection and Command Object -->
Dim myConnection As New OleDbConnection(myRTConnection)
Dim mySQL As String = "SELECT SurveyID FROM Surveys WHERE (ModuleID = " & ModuleID & ")"

myConnection.Open()
Dim myCommand As New OleDbCommand(mySQL, myConnection)
Dim myReader As OleDbDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection)

myReader.Read()
Dim MyRowCount As Integer = 0
MyRowCount = myReader.GetInt32(0)

myReader.Close()
myConnection.Close()

Return CInt(MyRowCount)
End Function
---
Otherwise, I think most of the rest of the module works fine, but I have only been able to test parts of it so far.

Brian
______________

B. Young

www.az-ta.com
lucast
Asp.Net User
Re: Error: No data exists for the row/column.11/10/2002 10:12:21 PM

0/0

Brian,

Just a hunch, but try adding an if before the myreader.read() like this....

....
if myReader.Read then
Dim MyRowCount As Integer = 0
MyRowCount = myReader.GetInt32(0)
end if
....

I've run into problems with null values and datareaders and seem to use this to keep from attempting to read or set a variable when the reader is empty.

HTH
Tom Lucas

byoung
Asp.Net User
Re: Error: No data exists for the row/column.11/11/2002 1:52:34 PM

0/0

I can't believe I didn't try that. I've got other code that uses that, and I've seen posts with that as well. Thanks! It seems to have worked on that one!
______________

B. Young

www.az-ta.com
sstoos
Asp.Net User
Re: Error: No data exists for the row/column.10/3/2003 8:39:44 PM

0/0

I was having problems with a similiar situation. This was the fix. Thanks!
4 Items, 1 Pages 1 |< << Go >> >|



Search This Site:





Other Resources:
catching Blob errors - borland.public.delphi.database.desktop - Web ... the BDE API functions - so - I guess - no chances to catch that some arguments ... PRB: "ResultSet Can Not Re-Read Row Data"' Error When Reading Data ...
GridViewAdapter Beta 3.0 with added support for CssClass, ClientID ... GridViewAdapter Beta 3.0 with added support for CssClass, ClientID, HeaderStyle-CssClass, row.CssClass, row.Attributes, > ROOT > NEWSGROUP > Asp.Net Forum > ...
No data exists for row/column - CJM's Blog - Recent Posts. No data exists for row/column. SQL CE Tip. Tags. SQL CE. View ... and read in data fine, but suddenly on the third row it produced this error. ...
error: "No data exists for the row/column" ... aspnet : 2006 May : error: "No data exists for the row/column" ... Re: error: "No data exists for the row/column" posted by Jeff Dillon on Wed, 10 May 2006 ...
www.canalvisualbasic.net: Error: No data exists for the row/column. Topic: Error: No data exists for the row/column. Posted: 04/10/2007 at 16:31 ... cargar todos los valores me muestra el error No data exists for the row/column. ...
212 Software - Program Updates - 2007 Program Updates Resolved an Unhandled Exception error - no data exists for the row/column. 12.17.07 ... Resolved Unhandled Exception error no data exists for the row/column. 12.12.07 ...
Attempt to Insert Column or Row Results in Error Message This article was written about products for which Microsoft no longer offers support. ... Remove the data in column IV or row 16384. To do so, follow these steps: 1. ...
www.bcstp.st/BcstpError.aspx?err=No data exists for the row/column. An error has occured. Error message: No data exists for the row/column. To try again, use your back button. To start over, go here. ...
Troubleshooting DBCC error 2570 in SQL Server 2005 Not all data types are checked for the validity of the column data. ... For every row that contains an invalid column value, a 2570 error is generated. ...
IBM Informix Dynamic Server v10 Information Center No server line exists in the license file. ... that the parameter is 0/1. 43007 Data required to insert a row into table_name. ...
Oracle Error Messages - Oracle Error Codes Explained - DbMotive Tools EXP-00025: dictionary shows no column for constraint %s.%lu ... 00043: Invalid data dictionary information in the row where column \\"%s\\" is ...
Forward Error Correction in IP Video Networks addition, because the matrix already exists, there is no additional delay. ... In order to overcome frequent packet drops, the row and column FEC data is used to ...
 
All Times Are GMT