Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted as Plain Text by [email protected] ( 12 years ago )
usuario = Login1.UserName;
            pass = Login1.Password;



            try
            {
                
                 OracleConnection c OracleConnection("Data Source=localhost;Persist Security Info=True;User ID=BASES;Password=worms;");
                OracleCommand query;

                conn.Open();
                query = new OracleCommand("SELECT no_cuenta, nombre, saldo,dpi FROM cuenta WHERE usuario='"+usuario+"' AND PASSWORD='"+pass+"'", conn);

                OracleDataReader Leer = query.ExecuteReader();
                DataTable datos = new DataTable();


                if (Leer.HasRows)
                {
                    
                    Leer.Read();
                    Session["cuenta"]=""+Leer["no_cuenta"];
                    Session["usuario"] = "" + Leer["nombre"];
                    Session["dpi"] = "" + Leer["dpi"];
                    conn.Close();
                    Response.Redirect("principal.aspx", false);

                }
                
                else {
                    conn.Close();
                }

            }
            catch (OracleException err2){
                
            }

 

Revise this Paste

Your Name: Code Language: