Search:
Namespaces
Discussions
.NET v1.1
Feedback
ASP.NET: PLEASE HELP
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngdebug' list
.
vikas
-- Moved from [aspdebug] to [aspngdebug] by Ronda (moderator) <
Click here to reveal e-mail address
> --This is a multi-part message in MIME format.------=_NextPart_000_00DE_01C1A775.CFBD81C0Content-Type: text/plain; charset="iso-8859-1"Content-Transfer-Encoding: quoted-printablePEASE GO THROUGH THE FOLLOWING RROR MESSAGE :ACTULA CODE IS ALOS LISTED BELOW :Server Error in '/' Application.-------------------------------------------------------------------------=-------Compilation Error=20Description: An error occurred during the compilation of a resource =required to service this request. Please review the following specific =error details and modify your source code appropriately.=20Compiler Error Message: BC30451: The name 'myDataReader' is not =declared.Source Error:Line 32: =20Line 33:=20Line 34: myDataReader.Read()Line 35:=20Line 36:=20=20Source File: D:\VIKAS\dotnet\vdotnet\smple.aspx Line: 34=20Show Detailed Compiler Output:ACTUAL CODE<%@ Page Language=3DVB Debug=3D"true" %><%@ Import Namespace=3D"System.Data" %><%@ Import NameSpace=3D"System.Data.SqlClient" %><script runat=3D"server">Sub Page_Load(Byval Sender as Object, ByVal E as EventArgs) dim i as integer Dim myConnection As SqlConnection Dim myCommand As SqlCommand Dim myDataReader As SqlDataReader myConnection =3D New
SqlConnection
( ="server=3Dlocalhost;uid=3Dsa;database=3Dnorthwind" ) myConnection.Open() mycommand=3DNew
SqlCommand
("Select * from orders",myconnection) myDataReader =3D myCommand.ExecuteReader() myDataReader.Read() i =3D i+1 Response.write("Customer ID =3D " ) Response.Write( myDataReader.Item("customerid") )=20 Response.Write( "<br>") Response.write("Order ID =3D " ) Response.write( myDataReader.Item( "Orderid" )) Response.Write( "<br>") TBCUSTOMERID.TEXT=3D myDataReader.Item("customerid") TBORDERID.TEXT=3D myDataReader.Item( "Orderid" )'mydatareader.close()end sub=20sub SubmitButn_Click(Sender as Object, e as EventArgs)=20myDataReader.Read() end sub</script><HTML><HEAD><TITLE> Northwind - list orderid and Customerid </TITLE></HEAD><BODY BACKGROUND=3D"./NYSKY.GIF" TEXT=3D"PURPLE" LINK=3D"DARKRED" =LINK=3D"DARKGREEN" ALINK=3D"BLUE" LEFTMARGIN=3D"40" TOPMARGIN=3D"100"><FORM RUNAT=3D"SERVER"><FONT FACE=3D"ARIAL" SIZE=3D"+1"><tABLE><tr> <TD> <ASP:lABEL ID =3D "lblOrderID"=20 runat=3D"server" text =3D "oRDER id : " /> </TD> <TD> <ASP:tEXTbOX=20 id =3D "tbOrderID"=20 RUNAT =3D "SERVER" maxlength=3D30 /> </td></TR><TR><TD> <ASP:label ID =3D "LBLcUSTOMERID" RUNAT=3D"SERVER" TEXT =3D "cUSTOMER id : " /></TD><TD> <ASP:tEXTbOX=20 id =3D "TBcUSTOMERid"=20 RUNAT =3D "SERVER" maxlength=3D30 /></td></TR><tr><td>Some Space here </td><td> <asp:button id=3D"Butok" Type=3D"Submit" TEXT=3D"submit" onclick=3D"SubmitButn_Click" runat=3D"Server" /></td></TR>=20</table></font></form></body></html>------=_NextPart_000_00DE_01C1A775.CFBD81C0Content-Type: text/html; charset="iso-8859-1"Content-Transfer-Encoding: quoted-printable<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=3DContent-Type content=3D"text/html; =charset=3Diso-8859-1"><META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR><STYLE></STYLE></HEAD><BODY bgColor=3D#ffffff><DIV><FONT face=3DArial size=3D2><BR><DIV><FONT face=3DArial size=3D2>PEASE GO THROUGH THE FOLLOWING =RROR MESSAGE=20:</FONT></DIV><DIV><FONT face=3DArial size=3D2></FONT> </DIV><DIV><FONT face=3DArial size=3D2>ACTULA CODE IS ALOS LISTED BELOW =:</FONT></DIV><DIV><FONT face=3DArial size=3D2></FONT> </DIV><DIV><FONT face=3DArial size=3D2>Server Error in '/'=20Application.<BR>---------------------------------------------------------=-----------------------</FONT></DIV><DIV> </DIV><DIV><FONT face=3DArial size=3D2>Compilation Error <BR>Description: An =error=20occurred during the compilation of a resource required to service this =request.=20Please review the following specific error details and modify your =source code=20appropriately. </FONT></DIV><DIV> </DIV><DIV><FONT face=3DArial size=3D2>Compiler Error Message: BC30451: The =name=20'myDataReader' is not declared.</FONT></DIV><DIV> </DIV><DIV><FONT face=3DArial size=3D2>Source Error:</FONT></DIV><DIV> </DIV><FONT face=3DArial size=3D2><DIV><BR>Line 32: <BR>Line 33: <BR>Line 34: =20myDataReader.Read()<BR>Line 35: <BR>Line 36: <BR> </DIV><DIV> </DIV><DIV>Source File: D:\VIKAS\dotnet\vdotnet\smple.aspx =Line: 34=20</DIV><DIV> </DIV><DIV><BR>Show Detailed Compiler Output:<BR></DIV><DIV> </DIV><DIV><STRONG>ACTUAL CODE</STRONG></DIV><DIV><STRONG><%@ Page Language=3DVB Debug=3D"true" %><BR><%@ =Import=20Namespace=3D"System.Data" %><BR><%@ Import =NameSpace=3D"System.Data.SqlClient"=20%></STRONG></DIV><DIV><BR><STRONG><script runat=3D"server"><BR>Sub Page_Load(Byval =Sender as=20Object, ByVal E as EventArgs)<BR> dim i as integer<BR> Dim=20myConnection As SqlConnection<BR> Dim myCommand As =20SqlCommand<BR> Dim myDataReader As =SqlDataReader<BR> myConnection =3D=20New
SqlConnection
( "server=3Dlocalhost;uid=3Dsa;database=3Dnorthwind"=20)<BR> myConnection.Open()<BR> mycommand=3DNew =SqlCommand("Select * from=20orders",myconnection)<BR> myDataReader =3D=20myCommand.ExecuteReader()</STRONG></DIV><DIV> </DIV><DIV><STRONG> myDataReader.Read()<BR> i =3D i+1<BR> =20Response.write("Customer ID =3D " )<BR> Response.Write( =20myDataReader.Item("customerid") ) <BR> Response.Write(=20"<br>")<BR> Response.write("Order ID =3D " )<BR> =Response.write(=20myDataReader.Item( "Orderid" ))<BR> Response.Write(=20"<br>")<BR> TBCUSTOMERID.TEXT=3D=20myDataReader.Item("customerid")<BR> TBORDERID.TEXT=3D =myDataReader.Item(=20"Orderid" )<BR>'mydatareader.close()<BR>end sub </STRONG></DIV><DIV> </DIV><DIV><BR><STRONG>sub SubmitButn_Click(Sender as Object, e as=20EventArgs)<BR> </STRONG></DIV><DIV> </DIV><DIV>myDataReader.Read()<BR></DIV><DIV> </DIV><DIV><BR><STRONG> end sub</STRONG></DIV><DIV> </DIV><DIV> </DIV><DIV> </DIV><DIV> </DIV><DIV> </DIV><DIV><STRONG></script></STRONG></DIV><DIV> </DIV><DIV><STRONG><HTML><BR><HEAD><BR><TITLE> Northwind - =list=20orderid and Customerid </TITLE><BR></HEAD><BR><BODY=20BACKGROUND=3D"./NYSKY.GIF" TEXT=3D"PURPLE" LINK=3D"DARKRED" =LINK=3D"DARKGREEN"=20ALINK=3D"BLUE" LEFTMARGIN=3D"40" TOPMARGIN=3D"100"><BR><FORM=20RUNAT=3D"SERVER"><BR><FONT FACE=3D"ARIAL"=20SIZE=3D"+1"><BR><tABLE><BR><tr><BR> =20<TD><BR> =20<ASP:lABEL<BR> ID =3D ="lblOrderID" <BR> =20runat=3D"server"<BR> text =3D "oRDER id :=20"<BR> /><BR> </TD></STRONG></DIV><DIV> </DIV><DIV><STRONG> <TD><BR> <ASP:tEXTbOX=20<BR> id =3D "tbOrderID"=20<BR> RUNAT =3D=20"SERVER"<BR> =maxlength=3D30<BR> =20/><BR> </td></STRONG></DIV><DIV> </DIV><DIV><STRONG></TR></STRONG></DIV><DIV> </DIV><DIV><BR><STRONG><TR><BR><TD><BR> =20<ASP:label<BR> ID =3D=20"LBLcUSTOMERID"<BR> =20RUNAT=3D"SERVER"<BR> TEXT =3D "cUSTOMER id =:=20"<BR> /></STRONG></DIV><DIV> </DIV><DIV><STRONG></TD></STRONG></DIV><DIV> </DIV><DIV><STRONG><TD><BR> <ASP:tEXTbOX=20<BR> id =3D ="TBcUSTOMERid"=20<BR> RUNAT =3D=20"SERVER"<BR> =maxlength=3D30<BR> =20/><BR></td><BR></TR></STRONG></DIV><DIV> </DIV><DIV><STRONG><tr><BR><td>Some Space here=20</td><BR><td><BR> =<asp:button<BR> =20id=3D"Butok"<BR> Type=3D"Submit"<BR> =TEXT=3D"submit"<BR> =onclick=3D"SubmitButn_Click"<BR> =20runat=3D"Server"<BR> =20/><BR></td><BR></TR></STRONG></DIV><DIV> </DIV><DIV><STRONG>=20<BR></table><BR></font><BR></form><BR></body><BR>=</html><BR></STRONG></DIV><DIV> </DIV><DIV> </DIV></FONT></FONT></DIV></BODY></HTML>------=_NextPart_000_00DE_01C1A775.CFBD81C0--
Reply to this message...
Alex Lowe
PEASE GO THROUGH THE FOLLOWING RROR MESSAGE :
ACTULA CODE IS ALOS LISTED BELOW :
Server Error in '/' Application.
------------------------------------------------------------------------
--------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: The name 'myDataReader' is not declared.
Source Error:
Line 32:
Line 33:
Line 34: myDataReader.Read()
Line 35:
Line 36:
Source File: D:\VIKAS\dotnet\vdotnet\smple.aspx Line: 34
Show Detailed Compiler Output:
ACTUAL CODE
<%@ Page Language=VB Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import NameSpace="System.Data.SqlClient" %>
<script runat="server">
Sub Page_Load(Byval Sender as Object, ByVal E as EventArgs)
dim i as integer
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim myDataReader As SqlDataReader
myConnection = New
SqlConnection
( "server=localhost;uid=sa;database=northwind" )
myConnection.Open()
mycommand=New
SqlCommand
("Select * from orders",myconnection)
myDataReader = myCommand.ExecuteReader()
myDataReader.Read()
i = i+1
Response.write("Customer ID = " )
Response.Write( myDataReader.Item("customerid") )
Response.Write( "<br>")
Response.write("Order ID = " )
Response.write( myDataReader.Item( "Orderid" ))
Response.Write( "<br>")
TBCUSTOMERID.TEXT= myDataReader.Item("customerid")
TBORDERID.TEXT= myDataReader.Item( "Orderid" )
'mydatareader.close()
end sub
sub SubmitButn_Click(Sender as Object, e as EventArgs)
myDataReader.Read()
end sub
</script>
<HTML>
<HEAD>
<TITLE> Northwind - list orderid and Customerid </TITLE> </HEAD> <BODY
BACKGROUND="./NYSKY.GIF" TEXT="PURPLE" LINK="DARKRED" LINK="DARKGREEN" ALINK="BLUE" LEFTMARGIN="40" TOPMARGIN="100">
<FORM RUNAT="SERVER"> <FONT FACE="ARIAL" SIZE="+1"> <tABLE> <tr>
<TD>
<ASP:lABEL
ID = "lblOrderID"
runat="server"
text = "oRDER id : "
/>
</TD>
<TD>
<ASP:tEXTbOX
id = "tbOrderID"
RUNAT = "SERVER"
maxlength=30
/>
</td>
</TR>
<TR>
<TD>
<ASP:label
ID = "LBLcUSTOMERID"
RUNAT="SERVER"
TEXT = "cUSTOMER id : "
/>
</TD>
<TD>
<ASP:tEXTbOX
id = "TBcUSTOMERid"
RUNAT = "SERVER"
maxlength=30
/>
</td>
</TR>
<tr>
<td>Some Space here </td>
<td>
<asp:button
id="Butok"
Type="Submit"
TEXT="submit"
onclick="SubmitButn_Click"
runat="Server"
/>
</td>
</TR>
</table>
</font>
</form>
| [aspngdebug] member
Click here to reveal e-mail address
OUR ID<BR>
|
http://www.asplists.com/asplists/aspngreuse.asp
OIN/QUIT<BR>
|
http://www.asplists.com/search
EARCH Archives<BR>
| [aspngdebug] member
Click here to reveal e-mail address
OUR ID<BR>
|
http://www.asplists.com/asplists/aspngreuse.asp
OIN/QUIT<BR>
|
http://www.asplists.com/search
EARCH Archives<BR>
Reply to this message...
Scott
PEASE GO THROUGH THE FOLLOWING RROR MESSAGE :
ACTULA CODE IS ALOS LISTED BELOW :
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: The name 'myDataReader' is not declared.
Source Error:
Line 32:
Line 33:
Line 34: myDataReader.Read()
Line 35:
Line 36:
Source File: D:\VIKAS\dotnet\vdotnet\smple.aspx Line: 34
Show Detailed Compiler Output:
ACTUAL CODE
<%@ Page Language=VB Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import NameSpace="System.Data.SqlClient" %>
<script runat="server">
Sub Page_Load(Byval Sender as Object, ByVal E as EventArgs)
dim i as integer
Dim myConnection As SqlConnection
Dim myCommand As SqlCommand
Dim myDataReader As SqlDataReader
myConnection = New
SqlConnection
( "server=localhost;uid=sa;database=northwind" )
myConnection.Open()
mycommand=New
SqlCommand
("Select * from orders",myconnection)
myDataReader = myCommand.ExecuteReader()
myDataReader.Read()
i = i+1
Response.write("Customer ID = " )
Response.Write( myDataReader.Item("customerid") )
Response.Write( "<br>")
Response.write("Order ID = " )
Response.write( myDataReader.Item( "Orderid" ))
Response.Write( "<br>")
TBCUSTOMERID.TEXT= myDataReader.Item("customerid")
TBORDERID.TEXT= myDataReader.Item( "Orderid" )
'mydatareader.close()
end sub
sub SubmitButn_Click(Sender as Object, e as EventArgs)
myDataReader.Read()
end sub
</script>
<HTML>
<HEAD>
<TITLE> Northwind - list orderid and Customerid </TITLE>
</HEAD>
<BODY BACKGROUND="./NYSKY.GIF" TEXT="PURPLE" LINK="DARKRED" LINK="DARKGREEN" ALINK="BLUE" LEFTMARGIN="40" TOPMARGIN="100">
<FORM RUNAT="SERVER">
<FONT FACE="ARIAL" SIZE="+1">
<tABLE>
<tr>
<TD>
<ASP:lABEL
ID = "lblOrderID"
runat="server"
text = "oRDER id : "
/>
</TD>
<TD>
<ASP:tEXTbOX
id = "tbOrderID"
RUNAT = "SERVER"
maxlength=30
/>
</td>
</TR>
<TR>
<TD>
<ASP:label
ID = "LBLcUSTOMERID"
RUNAT="SERVER"
TEXT = "cUSTOMER id : "
/>
</TD>
<TD>
<ASP:tEXTbOX
id = "TBcUSTOMERid"
RUNAT = "SERVER"
maxlength=30
/>
</td>
</TR>
<tr>
<td>Some Space here </td>
<td>
<asp:button
id="Butok"
Type="Submit"
TEXT="submit"
onclick="SubmitButn_Click"
runat="Server"
/>
</td>
</TR>
</table>
</font>
</form>
| [aspngdebug] member
Click here to reveal e-mail address
OUR ID<BR>
|
http://www.asplists.com/asplists/aspngreuse.asp
OIN/QUIT<BR>
|
http://www.asplists.com/search
EARCH Archives<BR>
</BODY>
</html>
Reply to this message...
System.Data.SqlClient.SqlCommand
System.Data.SqlClient.SqlConnection
System.Data.SqlClient.SqlDataReader
System.EventArgs
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com