Ejemplo n.º 1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     string SQL = "insert into tbluserlogin ( username, userpassword, securitylevel) values ('" + TextBox1.Text + "','anything','A');";
     DataAccess.db myDA = new DataAccess.db();
     myDA.connectionstring = "Data Source=devrystudentsp10.db.6077598.hostedresource.com;Initial Catalog=DeVryStudentSP10;User Id=DeVryStudentSP10;Password=OidLZqBv4;";
     myDA.Execute(SQL);
     LoadData();
 }
Ejemplo n.º 2
0
    private void LoadData()
    {
        DataAccess.db myDA = new DataAccess.db();
        System.Data.SqlClient.SqlDataReader dr;
        myDA.connectionstring = "Data Source=devrystudentsp10.db.6077598.hostedresource.com;Initial Catalog=DeVryStudentSP10;User Id=DeVryStudentSP10;Password=OidLZqBv4;";
        dr = myDA.GetData("select * from tbluserlogin");

        while (dr.Read())
        {
            Response.Write(dr.GetValue(1).ToString() + "<br />");
        }
    }