Click here to Skip to main content
15,895,423 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody,
i'm developing a asp.net web page which display data from a SQL Server.
All works fine however, when i add new data on my SQL Data Base they don't appear in the gridview.
I've tested my request in the tool on Visual Studio Web Developer the same problem, so I thought that my request is wrong !
However in SQL Server Management Studio Express there are no problems all my data appear with the same request.

This is a kind of bug or something i forget to set ?
Thanks you
XML
<asp:Content ID="Content3" runat="server"
    contentplaceholderid="ContentPlaceHolder2">
    <asp:GridView ID="GridView1" runat="server"
    AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Height="683px"
    Width="643px" style="margin-left: 0px">
                        <Columns>
                            <asp:BoundField DataField="adacc" HeaderText="Account" SortExpression="adacc" />
                            <asp:BoundField DataField="department" HeaderText="Department"
                                SortExpression="department" />
                            <asp:BoundField DataField="SPE" HeaderText="SPE"
                                SortExpression="SPE" />
                            <asp:BoundField DataField="hostname" HeaderText="Hostname"
                                SortExpression="hostname" />
                            <asp:BoundField DataField="location" HeaderText="Location"
                                SortExpression="location" />
                            <asp:BoundField DataField="software" HeaderText="Software"
                                SortExpression="software" />
                            <asp:BoundField DataField="genacc_user_adacc" HeaderText="Users"
                                SortExpression="genacc_user_adacc" />
                            <asp:BoundField DataField="pass" HeaderText="pass" SortExpression="PWD Encrypted" />
                        </Columns>
</asp:GridView>
<!-- SQL Request without login dectection ((    <%Response.Write(getuserID)%>    ))-->
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                EnableCaching="True"
                FilterExpression="genacc_user_adacc = 'HERMANS5'"
                ConnectionString="<%$ ConnectionStrings:LabAccManConnectionString %>"

        SelectCommand="SELECT     genacc_account.adacc, genacc_account.department, genacc_account.SPE, genacc_machines.hostname, genacc_machines.location,
                      genacc_machines.software, account_user.genacc_user_adacc, genacc_pw.pass
FROM         genacc_account INNER JOIN
                      genacc_machines ON genacc_account.id = genacc_machines.genacc_account_id INNER JOIN
                      account_user ON genacc_account.id = account_user.genacc_account_id INNER JOIN
                      genacc_pw ON genacc_account.id = genacc_pw.genacc_account_id">


</asp:SqlDataSource>
Posted
Updated 21-Apr-10 2:54am
v2

1 solution

After inserting data you must require to bind your grid again to view your inserted data.

so ones you press save call databind once data saved successfully.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900