Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/01/2008, 18:09
Avatar de CieloEterno
CieloEterno
 
Fecha de Ingreso: marzo-2006
Ubicación: México
Mensajes: 52
Antigüedad: 18 años, 2 meses
Puntos: 0
No se ha inicializado la propiedad ConnectionString.

He realizado algunas modificaciones:

Código PHP:
        Private Sub validar_Click(ByVal sender As ObjectByVal e As System.EventArgs)
            
            
Dim rsLectura As System.Data.Odbc.OdbcDataReader
            Dim query 
As String "select usuario from tsm_usuario where usuario='" txt_usuario.Text.Trim "' and clave='" txt_passwd.Text.Trim "' and activo=1"
            
            
Response.Write("<font color=orange size=4>Query " query "</font><br>")
            
Response.Write("<font color=orange size=4>ENTRA0 - abierto - *" cLRcon.State "* -  cerrado</font><br>")
            
            Try
                
Response.Write("<font color=orange size=4>ENTRA1 - abierto - *" cLRcon.State "* -  cerrado</font><br>")
                
cLRcon.Close()
                
Response.Write("<font color=orange size=4>ENTRA2 - abierto - *" cLRcon.State "* -  cerrado</font><br>")
                If 
cLRcon.State False Then
                    Response
.Write("<font color=orange size=4>ENTRA3 - cerrado -" cLRcon.State "- abierto</font><br>")
                    
''cLRcon.ConnectionString 
                    
                    
Response.Write("<font color=orange size=4>ENTRA5 - cerrado - abierto</font><br>")
                    
cLRcon.Open()
                    
Response.Write("<font color=orange size=4>ENTRA6 - cerrado - abierto</font><br>")
                Else
                    
Response.Write("<font color=orange size=4>ENTRA4 - cerrado - abierto</font><br>")
                
End If
                
                
ocdJL_Command.Dispose()
                
ocdJL_Command cn.putComand(querycLRcon)
                
Response.Write("<font color=gray size=4>AQUI-<br>")
                Try
                    
rsLectura ocdJL_Command.ExecuteReader()
                Catch 
ex As Exception
                    Response
.Write("<font color=purple size=4>OJOS-" ex.Message "<br>")
                    
rsLectura.Close()
                    
Response.Write("<font color=purple size=4>VEAMOS-" ex.Message "<br>")
                    
rsLectura ocdNA_Command.ExecuteReader()
                
End Try
                
                While 
rsLectura.Read
                    Session
("vusuario") = rsLectura.Item("usuario")
                    
Session.Timeout 30
                    Session
.Abandon()
                    
Response.Write("<font color=red size=4>SESSION<br>")
                
End While
                
                
'rsLectura.Close()
                
            Catch ex As Exception
                Response.Write("<font color=purple size=4>ULTIMO CATCH<br>")
                Response.Write("<font color=purple size=4>OJOS-**********<br>" + ex.Message + "<br>" + query + "--<br>")
            End Try
            

            '
If rsLectura.Read Then
            
'Session("vusuario") = rsLectura.Item("usuario")
            '
Session.Timeout 30
            
'Session.Abandon()
            '
Response.Write("<font color=red size=4>SESSION<br>")
            
'End If
            '
rsLectura.Close()
            
            If 
Session("vusuario") = True Then
                Response
.Write("<font color=darkblue size=4>Existe la sesión del usuario</font>")
            Else
                
Response.Write("<font color=green size=4>NO Existe la sesión del usuario</font>")
            
End If
            
        
End Sub 


Ahora, el error que obtengo es el siguiente:
No se ha inicializado la propiedad ConnectionString.

Al imprimir en pantalla, se muestran los siguientes avisos (response.write) que estoy colocando:

Query select usuario from tsm_usuario where usuario='administrador' and clave='123' and activo=1
ENTRA0 - abierto - *0* - cerrado
ENTRA1 - abierto - *0* - cerrado
ENTRA2 - abierto - *0* - cerrado
ENTRA3 - cerrado -0- abierto
ENTRA5 - cerrado - abierto
ULTIMO CATCH
OJOS-**********
No se ha inicializado la propiedad ConnectionString.
select usuario from tsm_usuario where usuario='administrador' and clave='123' and activo=1--
NO Existe la sesión del usuario


- Alguien sabe como Inicializar la propiedad ConnectionString? O cómo podrían soluciar este problema???
__________________
Aquel que no tiene nada por lo cual morir, no tiene nada por que vivir