Visual Basic.NET - Problema carga lenta

 
Vista:

Problema carga lenta

Publicado por alberto (1 intervención) el 01/02/2007 16:09:49
Estoy realizando una aplicacion que manaja una base de datos en un server y desde las terminales se realizan consultas sobre la base. Hasta ahi todo bien, pero luego de obtener un recorset con los datos deseados al colocarlos en objetos(textbox, algun flexgrid) para visualizarlos tarda una eternidad, en casos hasta 25 segundos. Por qué sucede esto? Hay alguna forma de acortar este tiempo?
With Form3.mfgbusqueda
linea1 = "apellidos ='" & .TextMatrix(.Row, 3) & "' and "
linea1 = linea1 & "nombres ='" & .TextMatrix(.Row, 4) & "' and "
linea1 = linea1 & "left(expediente,6)=" & .TextMatrix(.Row, 1) & " and "
linea1 = linea1 & "right(expediente,2)=" & .TextMatrix(.Row, 2) & " and "
linea1 = linea1 & "nacionalid='" & .TextMatrix(.Row, 5) & "' and "
linea1 = linea1 & "fechaini= '" & .TextMatrix(.Row, 6) & "' and "
linea1 = linea1 & "ndocumento='" & .TextMatrix(.Row, 7) & "'"
End With

Set RSAUX = db.OpenRecordset("select * from personas where " & linea1)
' LLENO LOS CAMPOS DEL FORMULARIO DE MUESTRA

With RSAUX
Form1.Label24.Caption = "Ingreso a llenado " & Time
.MoveFirst
Form1.txtExp = Left(.Fields("expediente"), 6)
Form1.txtAño = Right(.Fields("expediente"), 4)
Form1.txtFechaInit = .Fields("fechaini").Value
Form1.txtNombres = .Fields("nombres").Value
Form1.txtApellidos = .Fields("apellidos").Value
If (Not IsNull(.Fields("nacionalid").Value)) Then Form1.cboNAc = .Fields("nacionalid").Value
Form1.txtNroDoc = .Fields("ndocumento").Value
Form1.cboPaisNac = .Fields("paisnac").Value
Form1.cboReligion = .Fields("religion").Value
Form1.cboProfesion = .Fields("profesion").Value
Form1.cboInhab = .Fields("detenido").Value
Form1.TxtEstudios = .Fields("estudios").Value
Form1.txtFojas = .Fields("FOJAS").Value
Select Case .Fields("estadociv").Value
Case "C": Form1.cboEstadoCivil.Text = "CASADO/A"
Case "D": Form1.cboEstadoCivil.Text = "DIVORSIADO/A"
Case "S": Form1.cboEstadoCivil.Text = "SOLTERO/A"
Case "V": Form1.cboEstadoCivil.Text = "VIUDO/A"
End Select
End With
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder