I'm getting this error, can someone please HELP!!!!!! thx
--------------------------------------------------------------------------------------------------------------------------------------------
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: BC30260: 'btnQuery1' is already declared as
'Protected Dim WithEvents btnQuery1 As
System.Web.UI.WebControls.Button' in this class.
Source Error:
Line 5: <SCRIPT LANGUAGE="VB" RUNAT="server">
Line 6:
Line 7: Sub btnQuery1(Sender As Object, E As System.EventArgs)
Line 8: Dim oConn As OleDbConnection
Line 9: Dim oDA As OleDbDataAdapter
Source File: c:\inetpub\wwwroot\bhavish\products_update.aspx Line:
7
Show Detailed Compiler Output:
C:\WINDOWS\system32"C:\WINDOWS\Microsoft.NET\Frame work
\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly
\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System. dll" /R:"C:\WINDOWS
\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50 a3a\System.Web.dll" /
R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices
\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServic es.dll" /R:"C:
\WINDOWS\assembly\GAC_32\System.Data
\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a
\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml
\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d 50a3a
\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Code.wwr45mvl.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11 d50a3a
\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL
\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\Syste m.Web.Mobile.dll" /
out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
Files\root\26676eb7\92c7e946\App_Web_o0pukmuo.dll" /debug- /
define:_MYTYPE=\"Web\" /
imports:Microsoft.VisualBasic,System,System.Collec tions,System.Collections.Specialized,System.Config uration,System.Text,System.Text.RegularExpressions ,System.Web,System.Web.Caching,System.Web.SessionS tate,System.Web.Security,System.Web.Profile,System .Web.UI,System.Web.UI.WebControls,System.Web.UI.We bControls.WebParts,System.Web.UI.HtmlControls
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files
\root\26676eb7\92c7e946\App_Web_o0pukmuo.0.vb" "C:\WINDOWS
\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Web_o0pukmuo.1.vb"
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
c:\inetpub\wwwroot\bhavish\products_update.aspx(7) : error BC30260:
'btnQuery1' is already declared as 'Protected Dim WithEvents btnQuery1
As System.Web.UI.WebControls.Button' in this class.
Sub btnQuery1(Sender As Object, E As System.EventArgs)
~~~~~~~~~
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42
--------------------------------------------------------------------------------------------------------------------------------------------
Here is my code....
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<SCRIPT LANGUAGE="VB" RUNAT="server">
Sub btnQuery1(Sender As Object, E As System.EventArgs)
Dim oConn As OleDbConnection
Dim oDA As OleDbDataAdapter
Dim oDS As New DataSet
oConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Inetpub\wwwroot\bhavish\StoresDbs.mdb")
oConn.Open()
dim str as string = txtSQL.text
oDA = New OleDbDataAdapter("SELECT * FROM product", oConn)
dim cmdSelect as New OleDbCommand(sSelectSQL,cnAccess)
oDA.Fill(oDS, "product")
dgBands.DataSource = oDS
dgBands.DataBind()
oDS.Dispose()
oDS = Nothing
oDA.Dispose()
oDA = Nothing
oConn.Close()
oConn = Nothing
txtSQL.visible = "false"
btnQuery1.visible = "false"
dgbands.visible = "true"
End Sub
</SCRIPT>
<html>
<body background="pale.jpg" bgproperties="fixed">
<titleOur Stores </title>
<form id="xx" runat="server">
<asp:TextBox id="txtSQL" runat="server" />
<asp:Button id="btnQuery1" text="Find" runat="server" />
</form>
<asp:DataGrid id="dgBands" runat="server"
BorderColor="#000000"
BorderWidth="2"
GridLines="Both"
CellPadding="5"
CellSpacing="0"
Font-Name="Arial"
HeaderStyle-BackColor="#C0C0C0"
visible="false"
/>
</BODY>
</html> 2 3908
It looks like you have two btnQuery1 routines. This one is a Sub, the other
has the protected keyword.
I see that this is inline VB. Do you also have a code behind? If so, then
check here for your btnQuery1.
--
Best regards,
Dave Colliver. http://www.AshfieldFOCUS.com
~~ http://www.FOCUSPortals.com - Local franchises available
"psychomad" <bh*********@gmail.comwrote in message
news:11**********************@r3g2000prh.googlegro ups.com...
I'm getting this error, can someone please HELP!!!!!! thx
--------------------------------------------------------------------------------------------------------------------------------------------
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: BC30260: 'btnQuery1' is already declared as
'Protected Dim WithEvents btnQuery1 As
System.Web.UI.WebControls.Button' in this class.
Source Error:
Line 5: <SCRIPT LANGUAGE="VB" RUNAT="server">
Line 6:
Line 7: Sub btnQuery1(Sender As Object, E As System.EventArgs)
Line 8: Dim oConn As OleDbConnection
Line 9: Dim oDA As OleDbDataAdapter
Source File: c:\inetpub\wwwroot\bhavish\products_update.aspx Line:
7
Show Detailed Compiler Output:
C:\WINDOWS\system32"C:\WINDOWS\Microsoft.NET\Frame work
\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly
\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System. dll" /R:"C:\WINDOWS
\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50 a3a\System.Web.dll" /
R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices
\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServic es.dll" /R:"C:
\WINDOWS\assembly\GAC_32\System.Data
\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a
\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml
\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d 50a3a
\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Code.wwr45mvl.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11 d50a3a
\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL
\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\Syste m.Web.Mobile.dll" /
out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
Files\root\26676eb7\92c7e946\App_Web_o0pukmuo.dll" /debug- /
define:_MYTYPE=\"Web\" /
imports:Microsoft.VisualBasic,System,System.Collec tions,System.Collections.Specialized,System.Config uration,System.Text,System.Text.RegularExpressions ,System.Web,System.Web.Caching,System.Web.SessionS tate,System.Web.Security,System.Web.Profile,System .Web.UI,System.Web.UI.WebControls,System.Web.UI.We bControls.WebParts,System.Web.UI.HtmlControls
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files
\root\26676eb7\92c7e946\App_Web_o0pukmuo.0.vb" "C:\WINDOWS
\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Web_o0pukmuo.1.vb"
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
c:\inetpub\wwwroot\bhavish\products_update.aspx(7) : error BC30260:
'btnQuery1' is already declared as 'Protected Dim WithEvents btnQuery1
As System.Web.UI.WebControls.Button' in this class.
Sub btnQuery1(Sender As Object, E As System.EventArgs)
~~~~~~~~~
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42
--------------------------------------------------------------------------------------------------------------------------------------------
Here is my code....
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<SCRIPT LANGUAGE="VB" RUNAT="server">
Sub btnQuery1(Sender As Object, E As System.EventArgs)
Dim oConn As OleDbConnection
Dim oDA As OleDbDataAdapter
Dim oDS As New DataSet
oConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Inetpub\wwwroot\bhavish\StoresDbs.mdb")
oConn.Open()
dim str as string = txtSQL.text
oDA = New OleDbDataAdapter("SELECT * FROM product", oConn)
dim cmdSelect as New OleDbCommand(sSelectSQL,cnAccess)
oDA.Fill(oDS, "product")
dgBands.DataSource = oDS
dgBands.DataBind()
oDS.Dispose()
oDS = Nothing
oDA.Dispose()
oDA = Nothing
oConn.Close()
oConn = Nothing
txtSQL.visible = "false"
btnQuery1.visible = "false"
dgbands.visible = "true"
End Sub
</SCRIPT>
<html>
<body background="pale.jpg" bgproperties="fixed">
<titleOur Stores </title>
<form id="xx" runat="server">
<asp:TextBox id="txtSQL" runat="server" />
<asp:Button id="btnQuery1" text="Find" runat="server" />
</form>
<asp:DataGrid id="dgBands" runat="server"
BorderColor="#000000"
BorderWidth="2"
GridLines="Both"
CellPadding="5"
CellSpacing="0"
Font-Name="Arial"
HeaderStyle-BackColor="#C0C0C0"
visible="false"
/>
</BODY>
</html>
you have two members with name btnQuery1: a sub and a Button instance.
Renaming the sub as btnQuery1_Click will fix the problem and make the sub
name meaningful...
"psychomad" wrote:
I'm getting this error, can someone please HELP!!!!!! thx
--------------------------------------------------------------------------------------------------------------------------------------------
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: BC30260: 'btnQuery1' is already declared as
'Protected Dim WithEvents btnQuery1 As
System.Web.UI.WebControls.Button' in this class.
Source Error:
Line 5: <SCRIPT LANGUAGE="VB" RUNAT="server">
Line 6:
Line 7: Sub btnQuery1(Sender As Object, E As System.EventArgs)
Line 8: Dim oConn As OleDbConnection
Line 9: Dim oDA As OleDbDataAdapter
Source File: c:\inetpub\wwwroot\bhavish\products_update.aspx Line:
7
Show Detailed Compiler Output:
C:\WINDOWS\system32"C:\WINDOWS\Microsoft.NET\Frame work
\v2.0.50727\vbc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly
\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System. dll" /R:"C:\WINDOWS
\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50 a3a\System.Web.dll" /
R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseSer vices
\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServic es.dll" /R:"C:
\WINDOWS\assembly\GAC_32\System.Data
\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a
\System.Drawing.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml
\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d 50a3a
\System.Web.Services.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework
\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Code.wwr45mvl.dll" /R:"C:\WINDOWS\assembly
\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11 d50a3a
\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL
\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\Syste m.Web.Mobile.dll" /
out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET
Files\root\26676eb7\92c7e946\App_Web_o0pukmuo.dll" /debug- /
define:_MYTYPE=\"Web\" /
imports:Microsoft.VisualBasic,System,System.Collec tions,System.Collections.Specialized,System.Config uration,System.Text,System.Text.RegularExpressions ,System.Web,System.Web.Caching,System.Web.SessionS tate,System.Web.Security,System.Web.Profile,System .Web.UI,System.Web.UI.WebControls,System.Web.UI.We bControls.WebParts,System.Web.UI.HtmlControls
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files
\root\26676eb7\92c7e946\App_Web_o0pukmuo.0.vb" "C:\WINDOWS
\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root
\26676eb7\92c7e946\App_Web_o0pukmuo.1.vb"
Microsoft (R) Visual Basic Compiler version 8.0.50727.42
for Microsoft (R) .NET Framework version 2.0.50727.42
Copyright (c) Microsoft Corporation. All rights reserved.
c:\inetpub\wwwroot\bhavish\products_update.aspx(7) : error BC30260:
'btnQuery1' is already declared as 'Protected Dim WithEvents btnQuery1
As System.Web.UI.WebControls.Button' in this class.
Sub btnQuery1(Sender As Object, E As System.EventArgs)
~~~~~~~~~
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET Version:2.0.50727.42
--------------------------------------------------------------------------------------------------------------------------------------------
Here is my code....
<%@ Page Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<SCRIPT LANGUAGE="VB" RUNAT="server">
Sub btnQuery1(Sender As Object, E As System.EventArgs)
Dim oConn As OleDbConnection
Dim oDA As OleDbDataAdapter
Dim oDS As New DataSet
oConn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=C:\Inetpub\wwwroot\bhavish\StoresDbs.mdb")
oConn.Open()
dim str as string = txtSQL.text
oDA = New OleDbDataAdapter("SELECT * FROM product", oConn)
dim cmdSelect as New OleDbCommand(sSelectSQL,cnAccess)
oDA.Fill(oDS, "product")
dgBands.DataSource = oDS
dgBands.DataBind()
oDS.Dispose()
oDS = Nothing
oDA.Dispose()
oDA = Nothing
oConn.Close()
oConn = Nothing
txtSQL.visible = "false"
btnQuery1.visible = "false"
dgbands.visible = "true"
End Sub
</SCRIPT>
<html>
<body background="pale.jpg" bgproperties="fixed">
<titleOur Stores </title>
<form id="xx" runat="server">
<asp:TextBox id="txtSQL" runat="server" />
<asp:Button id="btnQuery1" text="Find" runat="server" />
</form>
<asp:DataGrid id="dgBands" runat="server"
BorderColor="#000000"
BorderWidth="2"
GridLines="Both"
CellPadding="5"
CellSpacing="0"
Font-Name="Arial"
HeaderStyle-BackColor="#C0C0C0"
visible="false"
/>
</BODY>
</html>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: TBocchino |
last post by:
We have used master pages for our website and everything works fine until we
need to update one of the dll files. When a new dll is added or an old one is
updated the website gives an error message...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |