R
Ron H.
I am trying to read in records from a database into a custom table into the
aspx page. GridView, DetailsView, and FormView do not fit in with what I am
trying to do. Therefore I am attempting to hand code this procedure into the
page. I tried using SQLDataReader, but it is not working. Can anyone show
me how to accomplish this task.
Generating multiple errors
-----------------------
<% Dim myReader As SQLDataReader
sqldatareader = myCommand.ExecuteReader()%>
----------------
Here is the old ASP Code I am trying to convert to ASP.Net
--------Old ASP I'm Trying To Convert--------
<%
Dim sqltext
sqltext = "SELECT * FROM Services"
Dim RS
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.CursorType = adOpenStatic
RS.Open sqltext, "DSN=services"
RS.MoveFirst
%>
<% While NOT oRSp.EOF %>
<tr>
<td> <% Response.Write oRSp("ServiceName") %> </td>
<td> <% Response.Write oRSp("Price") %> </td>
</tr>
<% oRSp.MoveNext
Wend %>
----------------------------
aspx page. GridView, DetailsView, and FormView do not fit in with what I am
trying to do. Therefore I am attempting to hand code this procedure into the
page. I tried using SQLDataReader, but it is not working. Can anyone show
me how to accomplish this task.
Generating multiple errors
-----------------------
<% Dim myReader As SQLDataReader
sqldatareader = myCommand.ExecuteReader()%>
----------------
Here is the old ASP Code I am trying to convert to ASP.Net
--------Old ASP I'm Trying To Convert--------
<%
Dim sqltext
sqltext = "SELECT * FROM Services"
Dim RS
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.CursorType = adOpenStatic
RS.Open sqltext, "DSN=services"
RS.MoveFirst
%>
<% While NOT oRSp.EOF %>
<tr>
<td> <% Response.Write oRSp("ServiceName") %> </td>
<td> <% Response.Write oRSp("Price") %> </td>
</tr>
<% oRSp.MoveNext
Wend %>
----------------------------