GridView not displaying

Joined
Feb 3, 2010
Messages
1
Reaction score
0
I cannot get the gridview to show any data with the code below, and I have no idea why. There is data in the database that is newer than 10 days old. Here's what I have:

Option Infer On
Option Explicit On

Partial Class Customers_transactions
Inherits System.Web.UI.Page

Dim dte10DaysAgo As Date = DateTime.Now.AddDays(-10).ToString("MM/dd/yyyy")

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

calStartDate.SelectedDate = dte10DaysAgo
calStartDate.VisibleDate = dte10DaysAgo

End Sub

End Class

_____________________________

<asp:GridView ID="gvTransations" runat="server" AutoGenerateColumns="False" DataSourceID="U4GP_AccessDataSource"
CellPadding="4" ForeColor="#333333" GridLines="None">
<RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
<Columns>
<asp:BoundField DataField="DateOccurred" HeaderText="Date Occurred"
SortExpression="DateOccurred" DataFormatString="{0:d}" />
<asp:BoundField DataField="TransactionType" HeaderText="Transaction Type"
SortExpression="TransactionType" />
<asp:BoundField DataField="AccountNo" HeaderText="Account Number"
SortExpression="AccountNo" />
<asp:BoundField DataField="TransactionAmt"
HeaderText="Transaction Amount" SortExpression="TransactionAmt"
DataFormatString="{0:c}" />
</Columns>
<FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
<HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>

<asp:AccessDataSource ID="U4GP_AccessDataSource" runat="server"
DataFile="~/App_Data/OnlineBankingData.mdb"





SelectCommand="SELECT [AccountNo], [DateOccurred], [TransactionAmt], [TransactionType] FROM [tblTransactions] WHERE (([CustomerID] = ?) AND ([DateOccurred] &gt;= ?)) ORDER BY [DateOccurred] DESC">
<SelectParameters>
<asp:SessionParameter Name="CustomerID" SessionField="CustID" Type="Int32" />
<asp:FormParameter FormField="calStartDate" Name="DateOccurred"
Type="DateTime" />
</SelectParameters>
</asp:AccessDataSource>

Ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top