
August 23rd, 2000, 07:48 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,575
  
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 ?
|