Visual Basic - COMO LEO ARCHIVOS DBASE III?

Life is soft - evento anual de software empresarial
 
Vista:

COMO LEO ARCHIVOS DBASE III?

Publicado por Chileno (3 intervenciones) el 27/06/2001 21:43:59
Hola amigos;

Tengo un archivo secuencial en dbase III y necesito leerlo con VB5 pro,
además quiero pasar los datos a un listbox, los campos consisten en:
NOMBRE string(30)
APELLIDOP string(13)
APELLIDOM string(13)
DIRECCION string(40)
TELEFONO string(6)

si me pueden ayudar, muchas gracias, sino también. GRACIAS!!
PD: no usar el correo, please.
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

RE:COMO LEO ARCHIVOS DBASE III?

Publicado por Vicky Castillo (17 intervenciones) el 28/06/2001 17:54:13
Hola, en alguna ocasion he creado el listbox con varios campos pero sin tener vinculada la base de datos al control listbox, sino que voy llenando los campos conforme voy recorriendo la tabla, te paso la rutina y ojala que te sirva.

Dim Rst as recordset,BaseDatos as Database
Set BaseDatos= OpenDatabase("Empleados.dbf", 0, 0)
Set Rst = BaseDatos.OpenRecordset("SELECT Nombre, ApellidoP, ApellidoM,Direccion, Telefono from DatosEmpleado")
If Not Rst.EOF Then Rst.MoveFirst
While Not Rst.EOF
cadena = Rst!Nombre& string(30 - Len(Rst!Nombre), " ") & Rst!ApellidoP & String(13 - Len(Rst!ApellidoP), " ") & Rst!ApellidoM & String(13 - Len(Rst!ApellidoM), " ") & _
Rst!Direccion & String(40 - Len(Rst!Direccion), " ") & Rst!Telefono
List1.AddItem cadena
Rst.MoveNext
Wend

Saludos
Set Rst = Nothing
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar