Skip to content
View in the app

A better way to browse. Learn more.

Komuniti @PuTeRA

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Error: Must declare the scalar variable "@email"

Featured Replies

Please guys, help me solving dis prob...when run the proj,got the error: Must declare the scalar variable "@email"...so frustrating...here goes my code

<table border="0" width="750">
<tr>
<td valign="top" style="width: 369px">
<asp:GridView ID="GridView1" runat="server" AllowPaging="true" AutoGenerateColumns="false" DataKeyNames="CartID" DataSourceID="SqlDataSource1" Width="370px" ForeColor="Black">
<Columns>
<asp:BoundField DataField="email" HeaderText="Email" ><HeaderStyle HorizontalAlign="Left" /></asp:BoundField>
<asp:BoundField DataField="firstname" HeaderText="First Name" SortExpression="firstname" ><HeaderStyle HorizontalAlign="Left" /></asp:BoundField>
<asp:BoundField DataField ="lastname" HeaderText="Last Name"><HeaderStyle HorizontalAlign ="Left" /></asp:BoundField>
<asp:CommandField ShowSelectButton="True" ><ItemStyle Width="50px" /></asp:CommandField>
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Cart.CartID],[Cart.ProdID],[Cart.email],[Cart.ProdName],[Cart.ProdPrice],[Cart.Quantity],[Cart.Total]
FROM [Cart] INNER JOIN [Customers] ON (Customers.email=@email)">
</asp:SqlDataSource>
</td>
<td valign="top">
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" DataKeyNames="CartID" Width="373px">
<EmptyDataTemplate >
Please select a customer<br /><br />
</EmptyDataTemplate>
<ItemTemplate >
<asp:Label ID="Label1" runat="server" Text="Cart ID:" Width="100px"></asp:Label>
<asp:TextBox ID="txtCartID" runat="server" ReadOnly="True" Width="200px" Text='<%# Eval("CartID") %>' ></asp:TextBox>

<asp:Label ID="Label2" runat="server" Text="Product ID:" Width="100px"></asp:Label>
<asp:TextBox ID="txtProdID" runat="server" ReadOnly="True" Width="200px" Text='<%# Eval ("ProdID") %>'></asp:TextBox>

<asp:Label ID="Label3" runat="server" Text="Product Name:" Width="100px"></asp:Label>
<asp:TextBox ID="txtProdName" runat="server" ReadOnly="true" Width="200px" Text='<%# Eval("ProdName") %>'></asp:TextBox>

<asp:Label ID="Label4" runat="server" Text="Product Price:" Width="100px"></asp:Label>
<asp:TextBox ID="txtProdPrice" runat="server" ReadOnly="true" Width="200px" Text='<%# Eval ("ProdPrice","{0:C}") %>'></asp:TextBox>

<asp:Label ID="Label5" runat="server" Text="Quantity:" Width="100px"></asp:Label>
<asp:TextBox ID="txtQuantity" runat="server" ReadOnly="true" Width="200px" Text='<%# Eval("Quantity") %>'></asp:TextBox>

<asp:Label ID="Label6" runat="server" Text="Total:" Width="100px"></asp:Label>
<asp:TextBox ID="txtTotal" runat="server" ReadOnly="true" Width="200px" Text='<%# Eval("Total","{0:C}") %>'></asp:TextBox>

</ItemTemplate>
</asp:FormView>
&nbsp;
</td>
</tr>
</table>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.