FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV 2024
→
[WD5.5] Field exists
[WD5.5] Field exists
Iniciado por Patrick Vandebroek, 15,dic. 2004 10:48 - 4 respuestas
Conéctese…
Patrick Vandebroek
#1
Publicado el 15,diciembre 2004 - 10:48
Hi All,
I have a procedure to import data from a Dbase file, but there is a problem with older versions where fields are not existing.
Can I check in WD5.5 if a field exists in a Dbase file?
Regards,
Patrick
Informar
0
0
Clive Dickinson
#2
Publicado el 16,diciembre 2004 - 00:49
Hi All,
I have a procedure to import data from a Dbase file, but there is a problem with older versions where fields are not existing.
Can I check in WD5.5 if a field exists in a Dbase file?
Regards,
Patrick
Why not have several dbase file definitions available and ask the user at runtime which version is to be used?
hth
Clive
Informar
0
0
Peter Somplatzky
#3
Publicado el 16,diciembre 2004 - 00:49
Hi Patrick,
you can open the DBF File with fOpen and seek for the Fieldname lets say in the first 500 Bytes. To be exact: (Number of fields + 1) * 32 Bytes = app. size of header.
Here you find a descrition of the DBF Header:
http://www.cs.cornell.edu/Courses/cs212/2001fa/Project/Part1/dbf.htm
Peter
Hi All,
I have a procedure to import data from a Dbase file, but there is a problem with older versions where fields are not existing.
Can I check in WD5.5 if a field exists in a Dbase file?
Regards,
Patrick
Informar
0
0
Patrick Vandebroek
#4
Publicado el 17,diciembre 2004 - 17:19
Why not have several dbase file definitions available and ask the user at runtime which version is to be used?
hth
Clive
That was also my first intention, till I realised what a mess this was.
In the past, nobody had ever wrote any documentation.
There are over 1000 clients who used the older versions of this program and there are clients which had the same version, buth the file defintion is different.
I don't have an overview of the file definition on each version, and if I had a file definition, it still can be different by several clients.
You see why I need to check if a field is existing.
Regards.
Informar
0
0
Al
#5
Publicado el 17,diciembre 2004 - 23:07
G'day Patrick
As an alternative to the Fopen option, there are dbase commands to list a file structure, so you could not run a short dbase program to open each file and list its structure to a text file, then read the text file in WD5.5 to get the structure and modify your read in program accordingly to include or skip missing fields.
I had a similar problem a few years ago and I simply built a master set of dbase files with all the possible fields for each file then at each site I ran a dbase program to append the data into my files and then read in from them.
Regards
Al
Informar
0
0
→ Volver a WINDEV 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto