1
Answer

Database - strange error

onez

onez

20y
1.7k
1
I update a Access database by inserting new records which I want sorted by date. They get added at the end so I have do go in and sort them descending to move them up top. I save the database, close it, and reopen it days later. I use my DataReader FindLastDate() function at it shows the same new dates still at the bottom! Why is this? Is there a way to sort a database automatically or permanently? Is there a way I can insert my records at the top?
Answers (1)
0
Niradhip Chakraborty

Niradhip Chakraborty

NA 6.5k 527k 15y

Your aspx page should look like this. You should call the javascript function on top of the page like below. Try this. You also can send the code.
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditProfile.aspx.cs" Inherits="Contents_EditMyProfile" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="
http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Test</title>
      <script type="text/javascript" language="javascript">
       function colorchange()
        {
            alert("test");
        }  
             
    </script>
</head>
<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0" class="body" onload="EditProfile_onload()">
    <form id="frmEditProfile" runat="server">
        <table cellpadding="0" cellspacing="0" width="900px" border="0">
            <tr align="left" valign="top">
              <td></td>    
            </tr>
         
        </table>
    </form>
  </body>
</html>
0
Abhay Mhatre

Abhay Mhatre

NA 29 0 15y
this is not working with my code. do you want to see my code?
0
Niradhip Chakraborty

Niradhip Chakraborty

NA 6.5k 527k 15y

To call a java script function from server side you can use the following code,and inside the javascript function you can call other javascript function.
Page.ClientScript.RegisterStartupScript(this.GetType(), "", "ColorChange();", true);