Visual Basic - Cargar Registro a un MSHFlexGrid una base de datos .DBF (foxpro)

Life is soft - evento anual de software empresarial
 
Vista:

Cargar Registro a un MSHFlexGrid una base de datos .DBF (foxpro)

Publicado por Jose Gpe. Sanz (2 intervenciones) el 11/10/2011 22:29:55
Saludos


El siguiente codigo carga los registros de una base de datos de access .mdb a un MSHFlexGrid,

Mi pregunta es la siguiente: usando el mismo codigo que carque los registro al MSHFlexGrid, pero de una base de datos .DBF (FOXPRO) y que componentes se agregan....?

Private Sub Imprimir()

Dim rsFicha As ADODB.Recordset

Set rsFicha = New Recordset

Dim id As Integer

If flex.Row <= 0 Then
MsgBox "No hay ningún registro seleccionado para imprimir", vbExclamation, "Imprimir ficha"
Exit Sub
End If

id = flex.TextMatrix(flex.Row, 0)
=======================================================================
rsFicha.Open "Select * FROM clientes Where Id=" & id, cnn, adOpenStatic, adLockReadOnly
========================================================================
If rsFicha.RecordCount > 0 Then

Set DataReport1.DataSource = rsFicha

With DataReport1
If rsFicha!id_Imagen <> "" Then

.Sections.Item("Sección1").Controls("lblSinFoto").Visible = False
Set .Sections.Item("Sección1").Controls("rptImagen").Picture = LoadPicture(App.Path & "\img\" & id)
Else
.Sections.Item("Sección1").Controls("lblSinFoto").Visible = True
End If
DataReport1.Show
End With
Else
MsgBox "No hay registro para imprimir ", vbInformation
End If

End Sub


Gracias pos su ayuda
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