Ver Mensaje Individual
  #7 (permalink)  
Antiguo 29/04/2005, 05:20
Leticia82
 
Fecha de Ingreso: febrero-2005
Mensajes: 31
Antigüedad: 20 años, 1 mes
Puntos: 0
Tenias razon no estoy volcandole nada.Aqui te mando lo que tengo yo hecho pero es que si no es asi no se como recuperar los datos.


public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button boton_registro;
protected System.Web.UI.WebControls.LinkButton boton_aqui;
protected System.Web.UI.WebControls.TextBox correo;
protected System.Web.UI.WebControls.TextBox clave;
protected System.Web.UI.WebControls.Label mensaje;

private void Page_Load(object sender, System.EventArgs e)
{

private void boton_registro_Click(object sender, System.EventArgs e)
{

//Almacenamiento del correo y la clave
string correo=this.Request.Form["this.correo"];
string clave=this.Request.Form["this.clave"];
this.Response.Write(correo);

//ESTABLECEMOS TODAS LAS INTRUCCIONES DE LA BD
//MANEJO DE LA INFORMACION

string sqlquery = "SELECT * FROM Persona WHERE (correo="+correo+" AND clave="+clave+")";
string ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\proyecto\\bd.mdb";
OleDbConnection con = new OleDbConnection(ConnectionString);
OleDbCommand cmd = new OleDbCommand(sqlquery,con);


con.Open();
cmd.ExecuteNonQuery();

object resultquery=cmd.ExecuteScalar();

if(int.Parse(resultquery.ToString())>0)
{

this.Response.Redirect("WebForm3.aspx");
}
else
{
this.Response.Write("ERROR");
}

con.Close();
}
}