Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/06/2009, 10:29
igonfil
 
Fecha de Ingreso: junio-2008
Mensajes: 250
Antigüedad: 18 años, 4 meses
Puntos: 1
Respuesta: error en una conexion

ya tengo definido la conexion (con) y sigue saliendo el mismo error

Código PHP:
Imports System.Data.OleDb
Imports CConexion
Partial 
Class _Default
    Inherits System
.Web.UI.Page
    Dim con 
As New OleDbConnection
    Dim cmd 
As New OleDbCommand
    Dim dr 
As OleDbDataReader    


    
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        con 
= New OleDbConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
        
cmd.CommandType = Data.CommandType.Text
        con
.Open()
        
cmd.Connection = con
        cmd
.CommandText = "select usuario, pass from Alumnos where usuario='" + TxtUsuario.Text + "' and pass='" + TxtPass.Text + "'"
        
dr = cmd.ExecuteReader
        
While (dr.Read())
            
Me.TxtPass.Text = dr("Pass")
        
End While
        
dr.Close()
        
con.Close()
    
End Sub
End 
Class