Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Err: Index 0 and out of range

Status
Not open for further replies.

jmeckley

Programmer
Jul 15, 2002
5,269
US
I am about to design my first web app here in the next few weeks. To begin to understand how web apps work I am using the Walk throughs in VS.Net.

I am attempting to connect my app to the pubs db on Sql Server 2000. The first page finally works! I get a list of book titles with their prices. The book title is a hyperlink with the ID as the identifer.

When you click on a book title the page is supose to update and display the details of the book, author, discount price, publish date.

When I click on a title I get an error message that says
"Index 0 is not non-negative and below total rows count."

I'm not sure where the code is incorrect. I followed the steps and with all the files and snipets of code I'm not sure what would be appropiate to post here. Thank you for your assistance

Jason Meckley
Database Analyst
WITF
 
Try stepping through your handler for the hyplerlink. Check to see what the index is and where you code breaks. If you can't figure out why it is breaking post the code where the application fails and we'll see what we can do. That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
I clicked Debug->Start in VS.Net The page tried to load and I got a different error. When I run it local it doesn't work because I cannot connect to the Sql server because my username is null. I don't know why.

When I copy the application to the webserver and view the webpage I get a message about the 0 index value being out of range. I don't know what I am doing in this language.

Thank you for your patience with me, I am still learning my left from right with ASP. Do you know of a good website, or book that is for beginners? I have ASP.NET and VB.NET Web Programming by Matt J Crouch. I wouldn't say this book is for novices. Thank you for your assistance

Jason Meckley
Database Analyst
WITF
 
Anything by the now extinct Wrox is good. The books should still be on shelf if the haven't all been boughten.

Or try
which username do you mean is null?? Maybe try using a known user and password in your connection string so you can step through the code and test it. If you want post another thread about the connection string and me or someone else around will have a crack at it.
That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top