SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 19th, 2000, 01:29 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
"Can't find column ..." - no matter what...

<i><b>Originally posted by : Trond Arve Nordheim (dufuz@kokofarmen.net)</b></i><br />I'm trying to make a simple little application that reads some rows from a remote database-server (MySQL).<br /><br />This is the code:<br />--<br />Dim cn As ADOConnection<br />Dim dsc As ADOCommand<br />Dim ds As New DataSet<br />Dim strSQL As String<br />dim RS as ADODataReader<br /><br />strSQL = "SELECT * FROM test"<br /><br />cn = New ADOConnection("DSN=aspplus")<br />dsc = New ADOCommand(strSQL, cn)<br />cn.Open()<br />dsc.Execute(RS)<br /><br />Do While (RS.Read())<br /> Response.Write(RS("id").toString() + "<br>")<br />Loop<br />--<br /><br />When adding "try", "catch" and "finally", to report any errors, this is what I get:<br />System.IndexOutOfRangeException: Can't find column id. at System.Data.ColumnsCollection.get_Item(System.Stri ng) at System.Data.ADO.ADODataReader.get_Item(System.Stri ng) at ASP81.bah_aspx.Page_Load(System.Object, System.EventArgs)<br /><br />It HAS to return some data, because the connection has been established, the query has been sendt, and the table it selects from contains 8 rows... Or something is wrong with my code <br /><br />Anybody have any suggestions ?

Reply With Quote
  #2  
Old August 23rd, 2000, 07:48 AM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 22
<i><b>Originally posted by : Doug Seven (doug.seven@codejunkies.net)</b></i><br /><br />The funny part is...you are not doing anyything wrong. In the current build, there is a bug in the ADODataReader. It currently does not work, and you will continue to get this error. This is suposed to be repaired in the Beta1 release coming soon (next month I think). Hold tight until then (I had the same problem...it was very frustrating).<br /><br />______________________________________<br />Doug Seven, MCSD<br />CodeJunkies.Net / ASPNextGen.com<br />doug.seven@codejunkies.net<br /><br />Visit www.ASPNextGen.com or www.theFutureOfASP.com, both brought to you exclusively by CodeJunkies.Net, for tutorials and information on ASP+ - the next generation of Active Server Pages.<br /><br />http://www.codejunkies.net<br /><br />"Between two evils, I always choose the one I haven't tried."<br />--Mae West<br /><br /><br />------------<br />Trond Arve Nordheim at 8/19/2000 10:29:49 AM<br /><br />I'm trying to make a simple little application that reads some rows from a remote database-server (MySQL).<br /><br />This is the code:<br />--<br />Dim cn As ADOConnection<br />Dim dsc As ADOCommand<br />Dim ds As New DataSet<br />Dim strSQL As String<br />dim RS as ADODataReader<br /><br />strSQL = "SELECT * FROM test"<br /><br />cn = New ADOConnection("DSN=aspplus")<br />dsc = New ADOCommand(strSQL, cn)<br />cn.Open()<br />dsc.Execute(RS)<br /><br />Do While (RS.Read())<br /> Response.Write(RS("id").toString() + "<br>")<br />Loop<br />--<br /><br />When adding "try", "catch" and "finally", to report any errors, this is what I get:<br />System.IndexOutOfRangeException: Can't find column id. at System.Data.ColumnsCollection.get_Item(System.Stri ng) at System.Data.ADO.ADODataReader.get_Item(System.Stri ng) at ASP81.bah_aspx.Page_Load(System.Object, System.EventArgs)<br /><br />It HAS to return some data, because the connection has been established, the query has been sendt, and the table it selects from contains 8 rows... Or something is wrong with my code <br /><br />Anybody have any suggestions ?

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > "Can't find column ..." - no matter what...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT